mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-06-25 07:37:42 +00:00
Compare commits
No commits in common. "d9943d2e7a2db4c9dc83ea8d1e437f9c4a304569" and "6df3bd6ff5d32ddd5244a71bf17d9c97068a6e51" have entirely different histories.
d9943d2e7a
...
6df3bd6ff5
106 changed files with 751 additions and 3039 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -21,8 +21,6 @@ build
|
||||||
*.kdev4
|
*.kdev4
|
||||||
/build*
|
/build*
|
||||||
.prefix/
|
.prefix/
|
||||||
.preview-ab/
|
|
||||||
.preview-cache/
|
|
||||||
.preview-config/
|
.preview-config/
|
||||||
.preview-data/
|
.preview-data/
|
||||||
preview.sh
|
preview.sh
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ include(CheckIncludeFiles)
|
||||||
|
|
||||||
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
ecm_find_qmlmodule(org.kde.pipewire 0.1)
|
||||||
|
|
||||||
set(SHIFT_DEFAULT_WALLPAPER_URL "file://${KDE_INSTALL_FULL_WALLPAPERDIR}/SHIFT/contents/images_dark/5120x2880.png")
|
set(SHIFT_DEFAULT_WALLPAPER_URL "file://${KDE_INSTALL_FULL_WALLPAPERDIR}/SHIFT/")
|
||||||
set(SHIFT_SHELL_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/shell")
|
set(SHIFT_SHELL_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/shell")
|
||||||
file(REMOVE_RECURSE "${SHIFT_SHELL_PACKAGE_DIR}")
|
file(REMOVE_RECURSE "${SHIFT_SHELL_PACKAGE_DIR}")
|
||||||
file(COPY shell/ DESTINATION "${SHIFT_SHELL_PACKAGE_DIR}" PATTERN "layout.js.in" EXCLUDE)
|
file(COPY shell/ DESTINATION "${SHIFT_SHELL_PACKAGE_DIR}" PATTERN "layout.js.in" EXCLUDE)
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ target_sources(mobileshellplugin PRIVATE ${mobileshellplugin_SRCS})
|
||||||
set_source_files_properties(
|
set_source_files_properties(
|
||||||
qml/components/AppLaunch.qml
|
qml/components/AppLaunch.qml
|
||||||
qml/components/Constants.qml
|
qml/components/Constants.qml
|
||||||
qml/components/Motion.qml
|
|
||||||
qml/dataproviders/AudioInfo.qml
|
qml/dataproviders/AudioInfo.qml
|
||||||
qml/dataproviders/BatteryInfo.qml
|
qml/dataproviders/BatteryInfo.qml
|
||||||
qml/dataproviders/BluetoothInfo.qml
|
qml/dataproviders/BluetoothInfo.qml
|
||||||
|
|
@ -52,10 +51,6 @@ ecm_target_qml_sources(mobileshellplugin SOURCES
|
||||||
qml/components/HapticsEffect.qml
|
qml/components/HapticsEffect.qml
|
||||||
qml/components/ListView.qml
|
qml/components/ListView.qml
|
||||||
qml/components/MarqueeLabel.qml
|
qml/components/MarqueeLabel.qml
|
||||||
qml/components/Motion.qml
|
|
||||||
qml/components/MotionColorAnimation.qml
|
|
||||||
qml/components/MotionNumberAnimation.qml
|
|
||||||
qml/components/MotionStateLayer.qml
|
|
||||||
qml/components/PanelBackground.qml
|
qml/components/PanelBackground.qml
|
||||||
qml/components/ScreenEdgeDragEffect.qml
|
qml/components/ScreenEdgeDragEffect.qml
|
||||||
qml/components/StartupFeedbackPanelFill.qml
|
qml/components/StartupFeedbackPanelFill.qml
|
||||||
|
|
|
||||||
|
|
@ -269,11 +269,11 @@ Item {
|
||||||
|
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
id: drawerAnimation
|
id: drawerAnimation
|
||||||
properties: "offset"
|
properties: "offset"
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
duration: root.state != "" ? MobileShell.Motion.duration(type) : 0
|
duration: root.state != "" ? Kirigami.Units.veryLongDuration : 0
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
script: {
|
script: {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,10 @@ Item {
|
||||||
|
|
||||||
property double brightnessPressedValue: 1
|
property double brightnessPressedValue: 1
|
||||||
Behavior on brightnessPressedValue {
|
Behavior on brightnessPressedValue {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialExtended }
|
NumberAnimation {
|
||||||
|
duration: Kirigami.Units.longDuration * 2
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenBrightness.ScreenBrightnessUtil {
|
ScreenBrightness.ScreenBrightnessUtil {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ Item {
|
||||||
Kirigami.Theme.backgroundColor.g,
|
Kirigami.Theme.backgroundColor.g,
|
||||||
Kirigami.Theme.backgroundColor.b,
|
Kirigami.Theme.backgroundColor.b,
|
||||||
0.9)
|
0.9)
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.StandardDecel } }
|
Behavior on color { ColorAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.OutQuad } }
|
||||||
opacity: {
|
opacity: {
|
||||||
let base = Math.max(0, Math.min(brightnessPressedValue, actionDrawer.offset / root.minimizedQuickSettingsOffset));
|
let base = Math.max(0, Math.min(brightnessPressedValue, actionDrawer.offset / root.minimizedQuickSettingsOffset));
|
||||||
return ShellSettings.Settings.convergenceModeEnabled ? base * 0.3 : base;
|
return ShellSettings.Settings.convergenceModeEnabled ? base * 0.3 : base;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ QQC2.Popup {
|
||||||
|
|
||||||
padding: Kirigami.Units.smallSpacing
|
padding: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
readonly property int popupAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
property string currentPluginId: ""
|
property string currentPluginId: ""
|
||||||
property Item __currentItem: null
|
property Item __currentItem: null
|
||||||
|
|
||||||
|
|
@ -73,11 +72,11 @@ QQC2.Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; from: 0; to: 1; type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
MobileShell.MotionNumberAnimation { property: "scale"; from: 0.9; to: 1; type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { property: "scale"; from: 0.9; to: 1; duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
exit: Transition {
|
exit: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; from: 1; to: 0; type: MobileShell.Motion.StandardAccel; duration: popup.popupAnimationDuration }
|
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: Kirigami.Units.shortDuration; easing.type: Easing.InCubic }
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Kirigami.ShadowedRectangle {
|
background: Kirigami.ShadowedRectangle {
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ MobileShell.BaseItem {
|
||||||
readonly property color disabledButtonColor: Kirigami.Theme.alternateBackgroundColor
|
readonly property color disabledButtonColor: Kirigami.Theme.alternateBackgroundColor
|
||||||
readonly property color disabledButtonHoverColor: mixColor(Kirigami.Theme.alternateBackgroundColor, Kirigami.Theme.textColor, 0.06)
|
readonly property color disabledButtonHoverColor: mixColor(Kirigami.Theme.alternateBackgroundColor, Kirigami.Theme.textColor, 0.06)
|
||||||
readonly property color disabledButtonPressedColor: Qt.darker(disabledButtonColor, 1.1)
|
readonly property color disabledButtonPressedColor: Qt.darker(disabledButtonColor, 1.1)
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleIn
|
|
||||||
|
|
||||||
function mixColor(base, overlay, ratio) {
|
function mixColor(base, overlay, ratio) {
|
||||||
return Qt.rgba(
|
return Qt.rgba(
|
||||||
|
|
@ -69,7 +67,10 @@ MobileShell.BaseItem {
|
||||||
// scale animation on press
|
// scale animation on press
|
||||||
property real zoomScale: 1
|
property real zoomScale: 1
|
||||||
Behavior on zoomScale {
|
Behavior on zoomScale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Press }
|
NumberAnimation {
|
||||||
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutExpo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
|
||||||
QuickSettingsDelegate {
|
QuickSettingsDelegate {
|
||||||
|
|
@ -22,7 +23,7 @@ QuickSettingsDelegate {
|
||||||
readonly property int tileRadius: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
readonly property int tileRadius: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
// scale animation on press
|
// scale animation on press
|
||||||
zoomScale: mouseArea.pressed ? root.pressedScale : 1
|
zoomScale: (ShellSettings.Settings.animationsEnabled && mouseArea.pressed) ? 0.9 : 1
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
// very simple shadow for performance
|
// very simple shadow for performance
|
||||||
|
|
@ -60,7 +61,7 @@ QuickSettingsDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast }
|
ColorAnimation { duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.shortDuration : 0; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
|
|
||||||
QuickSettingsDelegate {
|
QuickSettingsDelegate {
|
||||||
|
|
@ -20,7 +21,7 @@ QuickSettingsDelegate {
|
||||||
iconItem: icon
|
iconItem: icon
|
||||||
|
|
||||||
// scale animation on press
|
// scale animation on press
|
||||||
zoomScale: mouseArea.pressed ? root.pressedScale : 1
|
zoomScale: (ShellSettings.Settings.animationsEnabled && mouseArea.pressed) ? 0.9 : 1
|
||||||
|
|
||||||
background: Item {
|
background: Item {
|
||||||
// very simple shadow for performance
|
// very simple shadow for performance
|
||||||
|
|
@ -57,7 +58,7 @@ QuickSettingsDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast }
|
ColorAnimation { duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.shortDuration : 0; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Management/detail row shown in convergence mode. Two interaction zones:
|
* Management/detail row shown in convergence mode. Two interaction zones:
|
||||||
|
|
@ -48,9 +49,6 @@ Item {
|
||||||
return Kirigami.ColorUtils.linearInterpolation(bg, fg, 0.1);
|
return Kirigami.ColorUtils.linearInterpolation(bg, fg, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleIn
|
|
||||||
|
|
||||||
function mixColor(base, overlay, ratio) {
|
function mixColor(base, overlay, ratio) {
|
||||||
return Qt.rgba(
|
return Qt.rgba(
|
||||||
|
|
@ -119,14 +117,14 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast }
|
ColorAnimation { duration: Kirigami.Units.shortDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scale on press
|
// Scale on press
|
||||||
property real zoomScale: toggleMouse.pressed ? root.pressedScale : 1
|
property real zoomScale: (ShellSettings.Settings.animationsEnabled && toggleMouse.pressed) ? 0.9 : 1
|
||||||
Behavior on zoomScale {
|
Behavior on zoomScale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Press }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.OutExpo }
|
||||||
}
|
}
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
origin.x: togglePill.width / 2
|
origin.x: togglePill.width / 2
|
||||||
|
|
@ -162,7 +160,7 @@ Item {
|
||||||
opacity: root.enabled ? 1.0 : 0.4
|
opacity: root.enabled ? 1.0 : 0.4
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -188,13 +186,17 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
// Hover/press highlight
|
||||||
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: detailMouse.containsMouse
|
color: detailMouse.pressed ? Qt.rgba(Kirigami.Theme.textColor.r,
|
||||||
pressed: detailMouse.pressed
|
Kirigami.Theme.textColor.g,
|
||||||
hoverOpacity: 0.03
|
Kirigami.Theme.textColor.b, 0.06)
|
||||||
pressedOpacity: 0.06
|
: detailMouse.containsMouse ? Qt.rgba(Kirigami.Theme.textColor.r,
|
||||||
|
Kirigami.Theme.textColor.g,
|
||||||
|
Kirigami.Theme.textColor.b, 0.03)
|
||||||
|
: "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ QQC2.Popup {
|
||||||
|
|
||||||
padding: Kirigami.Units.smallSpacing
|
padding: Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
readonly property int popupAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int trayItemCount: trayList.count
|
readonly property int trayItemCount: trayList.count
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
|
|
@ -148,20 +147,17 @@ QQC2.Popup {
|
||||||
anchors.leftMargin: Kirigami.Units.smallSpacing
|
anchors.leftMargin: Kirigami.Units.smallSpacing
|
||||||
anchors.rightMargin: Kirigami.Units.smallSpacing
|
anchors.rightMargin: Kirigami.Units.smallSpacing
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: Kirigami.Theme.alternateBackgroundColor
|
color: trayMouse.pressed ? Qt.rgba(Kirigami.Theme.textColor.r,
|
||||||
|
Kirigami.Theme.textColor.g,
|
||||||
|
Kirigami.Theme.textColor.b, 0.08)
|
||||||
|
: trayMouse.containsMouse ? Qt.rgba(Kirigami.Theme.textColor.r,
|
||||||
|
Kirigami.Theme.textColor.g,
|
||||||
|
Kirigami.Theme.textColor.b, 0.04)
|
||||||
|
: Kirigami.Theme.alternateBackgroundColor
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: Kirigami.ColorUtils.linearInterpolation(
|
border.color: Kirigami.ColorUtils.linearInterpolation(
|
||||||
Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, trayItem.itemActive ? 0.16 : 0.08)
|
Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, trayItem.itemActive ? 0.16 : 0.08)
|
||||||
opacity: trayItem.itemActive ? 1 : 0.72
|
opacity: trayItem.itemActive ? 1 : 0.72
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
|
||||||
anchors.fill: parent
|
|
||||||
radius: parent.radius
|
|
||||||
hovered: trayMouse.containsMouse
|
|
||||||
pressed: trayMouse.pressed
|
|
||||||
hoverOpacity: 0.04
|
|
||||||
pressedOpacity: 0.08
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -241,11 +237,11 @@ QQC2.Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; from: 0; to: 1; type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
MobileShell.MotionNumberAnimation { property: "scale"; from: 0.9; to: 1; type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { property: "scale"; from: 0.9; to: 1; duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
exit: Transition {
|
exit: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; from: 1; to: 0; type: MobileShell.Motion.StandardAccel; duration: popup.popupAnimationDuration }
|
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: Kirigami.Units.shortDuration; easing.type: Easing.InCubic }
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.Overlay.modal: Rectangle {
|
QQC2.Overlay.modal: Rectangle {
|
||||||
|
|
|
||||||
|
|
@ -1,106 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
||||||
|
|
||||||
pragma Singleton
|
|
||||||
|
|
||||||
QtObject {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
enum Type {
|
|
||||||
Press,
|
|
||||||
Standard,
|
|
||||||
StandardAccel,
|
|
||||||
StandardDecel,
|
|
||||||
Emphasized,
|
|
||||||
EmphasizedAccel,
|
|
||||||
EmphasizedDecel,
|
|
||||||
SpatialFast,
|
|
||||||
SpatialDefault,
|
|
||||||
SpatialSlow,
|
|
||||||
SpatialExtended,
|
|
||||||
SpatialVerySlow,
|
|
||||||
EffectsFast,
|
|
||||||
EffectsDefault,
|
|
||||||
EffectsSlow
|
|
||||||
}
|
|
||||||
|
|
||||||
readonly property bool enabled: ShellSettings.Settings.animationsEnabled
|
|
||||||
|
|
||||||
readonly property int pressDuration: enabled ? Math.round(Kirigami.Units.shortDuration / 2) : 0
|
|
||||||
readonly property int standardDuration: enabled ? Kirigami.Units.longDuration : 0
|
|
||||||
readonly property int emphasizedDuration: enabled ? Kirigami.Units.longDuration + Kirigami.Units.shortDuration : 0
|
|
||||||
readonly property int spatialFastDuration: enabled ? Kirigami.Units.shortDuration : 0
|
|
||||||
readonly property int spatialDefaultDuration: enabled ? Kirigami.Units.longDuration : 0
|
|
||||||
readonly property int spatialSlowDuration: enabled ? Kirigami.Units.veryLongDuration : 0
|
|
||||||
readonly property int spatialExtendedDuration: enabled ? Kirigami.Units.longDuration * 2 : 0
|
|
||||||
readonly property int spatialVerySlowDuration: enabled ? Kirigami.Units.longDuration * 4 : 0
|
|
||||||
readonly property int effectsFastDuration: enabled ? Kirigami.Units.shortDuration : 0
|
|
||||||
readonly property int effectsDefaultDuration: enabled ? Kirigami.Units.longDuration : 0
|
|
||||||
readonly property int effectsSlowDuration: enabled ? Kirigami.Units.veryLongDuration : 0
|
|
||||||
|
|
||||||
readonly property real pressScaleIn: enabled ? 0.94 : 1
|
|
||||||
readonly property real pressScaleOut: enabled ? 1.08 : 1
|
|
||||||
readonly property real previewPressScale: enabled ? 0.95 : 1
|
|
||||||
readonly property real hiddenScale: enabled ? 0.72 : 1
|
|
||||||
readonly property real closeScaleOut: enabled ? 0.9 : 1
|
|
||||||
|
|
||||||
function duration(type: int): int {
|
|
||||||
switch (type) {
|
|
||||||
case Motion.Press:
|
|
||||||
return pressDuration;
|
|
||||||
case Motion.Emphasized:
|
|
||||||
case Motion.EmphasizedAccel:
|
|
||||||
case Motion.EmphasizedDecel:
|
|
||||||
return emphasizedDuration;
|
|
||||||
case Motion.SpatialFast:
|
|
||||||
return spatialFastDuration;
|
|
||||||
case Motion.SpatialDefault:
|
|
||||||
return spatialDefaultDuration;
|
|
||||||
case Motion.SpatialSlow:
|
|
||||||
return spatialSlowDuration;
|
|
||||||
case Motion.SpatialExtended:
|
|
||||||
return spatialExtendedDuration;
|
|
||||||
case Motion.SpatialVerySlow:
|
|
||||||
return spatialVerySlowDuration;
|
|
||||||
case Motion.EffectsFast:
|
|
||||||
return effectsFastDuration;
|
|
||||||
case Motion.EffectsDefault:
|
|
||||||
return effectsDefaultDuration;
|
|
||||||
case Motion.EffectsSlow:
|
|
||||||
return effectsSlowDuration;
|
|
||||||
default:
|
|
||||||
return standardDuration;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function easing(type: int): int {
|
|
||||||
switch (type) {
|
|
||||||
case Motion.StandardAccel:
|
|
||||||
case Motion.EmphasizedAccel:
|
|
||||||
return Easing.InQuart;
|
|
||||||
case Motion.StandardDecel:
|
|
||||||
case Motion.EmphasizedDecel:
|
|
||||||
return Easing.OutQuart;
|
|
||||||
case Motion.Emphasized:
|
|
||||||
return Easing.OutQuint;
|
|
||||||
case Motion.SpatialFast:
|
|
||||||
case Motion.SpatialDefault:
|
|
||||||
case Motion.SpatialSlow:
|
|
||||||
case Motion.SpatialExtended:
|
|
||||||
case Motion.SpatialVerySlow:
|
|
||||||
return Easing.OutExpo;
|
|
||||||
case Motion.Press:
|
|
||||||
case Motion.EffectsFast:
|
|
||||||
case Motion.EffectsDefault:
|
|
||||||
case Motion.EffectsSlow:
|
|
||||||
return Easing.OutCubic;
|
|
||||||
default:
|
|
||||||
return Easing.InOutQuad;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
|
|
||||||
ColorAnimation {
|
|
||||||
property int type: Motion.EffectsFast
|
|
||||||
|
|
||||||
duration: Motion.duration(type)
|
|
||||||
easing.type: Motion.easing(type)
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
|
|
||||||
NumberAnimation {
|
|
||||||
property int type: Motion.Standard
|
|
||||||
|
|
||||||
duration: Motion.duration(type)
|
|
||||||
easing.type: Motion.easing(type)
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property bool hovered: false
|
|
||||||
property bool pressed: false
|
|
||||||
property bool active: false
|
|
||||||
property bool stateLayerEnabled: true
|
|
||||||
property color color: Kirigami.Theme.textColor
|
|
||||||
property color activeColor: Kirigami.Theme.highlightColor
|
|
||||||
property real hoverOpacity: 0.08
|
|
||||||
property real pressedOpacity: 0.14
|
|
||||||
property real activeOpacity: 0.12
|
|
||||||
property real activeHoverOpacity: 0.18
|
|
||||||
property real radius: Kirigami.Units.cornerRadius
|
|
||||||
|
|
||||||
readonly property real layerOpacity: {
|
|
||||||
if (!stateLayerEnabled) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (pressed) {
|
|
||||||
return pressedOpacity;
|
|
||||||
}
|
|
||||||
if (active) {
|
|
||||||
return hovered ? activeHoverOpacity : activeOpacity;
|
|
||||||
}
|
|
||||||
return hovered ? hoverOpacity : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
radius: root.radius
|
|
||||||
color: root.active ? root.activeColor : root.color
|
|
||||||
opacity: root.layerOpacity
|
|
||||||
|
|
||||||
Behavior on color {
|
|
||||||
MotionColorAnimation { type: Motion.EffectsFast }
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
MotionNumberAnimation { type: Motion.EffectsFast }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -62,9 +62,9 @@ Item {
|
||||||
// for example, popup notifition when opening the popup notifition drawer
|
// for example, popup notifition when opening the popup notifition drawer
|
||||||
// in these incidents, we animate the color to prevent harsh transitions
|
// in these incidents, we animate the color to prevent harsh transitions
|
||||||
Behavior on panelColor {
|
Behavior on panelColor {
|
||||||
MotionColorAnimation {
|
ColorAnimation {
|
||||||
type: Motion.SpatialSlow
|
duration: animate ? Kirigami.Units.veryLongDuration * 1.5 : 0
|
||||||
duration: animate ? Math.round(Motion.duration(type) * 1.5) : 0
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||||
|
|
||||||
// Component to supplement the StartupFeedback window maximization animation for panel backgrounds.
|
// Component to supplement the StartupFeedback window maximization animation for panel backgrounds.
|
||||||
|
|
@ -17,16 +15,14 @@ Rectangle {
|
||||||
property var maximizedTracker
|
property var maximizedTracker
|
||||||
|
|
||||||
readonly property bool isShowing: height > 0
|
readonly property bool isShowing: height > 0
|
||||||
readonly property int heightAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int autoClearDelay: heightAnimationDuration + Kirigami.Units.veryLongDuration
|
|
||||||
|
|
||||||
// Smooth animation for colored rectangle
|
// Smooth animation for colored rectangle
|
||||||
MobileShell.MotionNumberAnimation on height {
|
NumberAnimation on height {
|
||||||
id: heightAnim
|
id: heightAnim
|
||||||
from: 0
|
from: 0
|
||||||
to: root.fullHeight
|
to: root.fullHeight
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: 200
|
||||||
duration: root.heightAnimationDuration
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-clear safety net.
|
// Auto-clear safety net.
|
||||||
|
|
@ -42,7 +38,7 @@ Rectangle {
|
||||||
// the original mobile behaviour while fixing the convergence path.
|
// the original mobile behaviour while fixing the convergence path.
|
||||||
Timer {
|
Timer {
|
||||||
id: autoClearTimer
|
id: autoClearTimer
|
||||||
interval: root.autoClearDelay
|
interval: 600 // animation duration (200) + settle time
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (!root.maximizedTracker || !root.maximizedTracker.showingWindow) {
|
if (!root.maximizedTracker || !root.maximizedTracker.showingWindow) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import QtQuick.Effects
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||||
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
import org.kde.plasma.private.nanoshell 2.0 as NanoShell
|
||||||
|
|
||||||
|
|
@ -39,8 +39,6 @@ Item {
|
||||||
id: window
|
id: window
|
||||||
|
|
||||||
property var startupFeedback: model.delegate
|
property var startupFeedback: model.delegate
|
||||||
readonly property int simpleOpenDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property int loadingIndicatorFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
visibility: Window.Maximized
|
visibility: Window.Maximized
|
||||||
flags: Qt.FramelessWindowHint
|
flags: Qt.FramelessWindowHint
|
||||||
|
|
@ -64,7 +62,7 @@ Item {
|
||||||
backgroundParent.y = -realHeight/2 + startupFeedback.iconStartY - root.topMargin;
|
backgroundParent.y = -realHeight/2 + startupFeedback.iconStartY - root.topMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MobileShell.Motion.enabled) {
|
if (ShellSettings.Settings.animationsEnabled) {
|
||||||
openAnimComplex.restart();
|
openAnimComplex.restart();
|
||||||
} else {
|
} else {
|
||||||
openAnimSimple.restart();
|
openAnimSimple.restart();
|
||||||
|
|
@ -80,35 +78,35 @@ Item {
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
id: parallelAnim
|
id: parallelAnim
|
||||||
property real animationDuration: MobileShell.Motion.duration(MobileShell.Motion.Emphasized)
|
property real animationDuration: Kirigami.Units.longDuration + Kirigami.Units.shortDuration
|
||||||
|
|
||||||
ScaleAnimator {
|
ScaleAnimator {
|
||||||
target: background
|
target: background
|
||||||
from: background.scale
|
from: background.scale
|
||||||
to: 1
|
to: 1
|
||||||
duration: parallelAnim.animationDuration
|
duration: parallelAnim.animationDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
ScaleAnimator {
|
ScaleAnimator {
|
||||||
target: iconParent
|
target: iconParent
|
||||||
from: iconParent.scale
|
from: iconParent.scale
|
||||||
to: 1
|
to: 1
|
||||||
duration: parallelAnim.animationDuration
|
duration: parallelAnim.animationDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
XAnimator {
|
XAnimator {
|
||||||
target: backgroundParent
|
target: backgroundParent
|
||||||
from: backgroundParent.x
|
from: backgroundParent.x
|
||||||
to: 0
|
to: 0
|
||||||
duration: parallelAnim.animationDuration
|
duration: parallelAnim.animationDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
YAnimator {
|
YAnimator {
|
||||||
target: backgroundParent
|
target: backgroundParent
|
||||||
from: backgroundParent.y
|
from: backgroundParent.y
|
||||||
to: 0
|
to: 0
|
||||||
duration: parallelAnim.animationDuration
|
duration: parallelAnim.animationDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,13 +134,13 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
target: windowRoot
|
target: windowRoot
|
||||||
properties: "opacity"
|
properties: "opacity"
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: window.simpleOpenDuration
|
easing.type: Easing.OutCubic
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
@ -214,10 +212,7 @@ Item {
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {}
|
||||||
type: MobileShell.Motion.EffectsFast
|
|
||||||
duration: window.loadingIndicatorFadeDuration
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
implicitHeight: Kirigami.Units.iconSizes.smallMedium
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,6 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
|
||||||
|
|
||||||
import org.kde.plasma.plasmoid
|
import org.kde.plasma.plasmoid
|
||||||
import org.kde.taskmanager as TaskManager
|
import org.kde.taskmanager as TaskManager
|
||||||
|
|
||||||
|
|
@ -144,9 +142,7 @@ Item {
|
||||||
opacity: 0
|
opacity: 0
|
||||||
property real scaleAmount: 1
|
property real scaleAmount: 1
|
||||||
|
|
||||||
readonly property real zoomScaleOut: 0.9
|
readonly property real zoomScaleOut: 0.8
|
||||||
readonly property int opacityAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property int scaleAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow)
|
|
||||||
|
|
||||||
function zoomIn() {
|
function zoomIn() {
|
||||||
// don't use check animationsEnabled here, so we ensure the scale and opacity is always 1 when disabled
|
// don't use check animationsEnabled here, so we ensure the scale and opacity is always 1 when disabled
|
||||||
|
|
@ -170,18 +166,17 @@ Item {
|
||||||
opacity = 0;
|
opacity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
id: opacityAnim
|
id: opacityAnim
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: 300
|
||||||
duration: itemContainer.opacityAnimationDuration
|
|
||||||
running: false
|
running: false
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on scaleAmount {
|
NumberAnimation on scaleAmount {
|
||||||
id: scaleAnim
|
id: scaleAnim
|
||||||
type: MobileShell.Motion.SpatialSlow
|
duration: 600
|
||||||
duration: itemContainer.scaleAnimationDuration
|
|
||||||
running: false
|
running: false
|
||||||
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
|
|
||||||
function evaluateAnimChange() {
|
function evaluateAnimChange() {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ Controls.Drawer {
|
||||||
property MobileShell.MaskManager maskManager
|
property MobileShell.MaskManager maskManager
|
||||||
|
|
||||||
required property bool horizontal
|
required property bool horizontal
|
||||||
readonly property int previewAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
signal wallpaperSettingsRequested()
|
signal wallpaperSettingsRequested()
|
||||||
|
|
||||||
|
|
@ -101,15 +100,15 @@ Controls.Drawer {
|
||||||
padding: Kirigami.Units.largeSpacing - (wallpapersView.currentIndex === index ? Kirigami.Units.smallSpacing : 0)
|
padding: Kirigami.Units.largeSpacing - (wallpapersView.currentIndex === index ? Kirigami.Units.smallSpacing : 0)
|
||||||
property real scaleAmount: wallpapersView.currentIndex === index ? 0 : Kirigami.Units.smallSpacing
|
property real scaleAmount: wallpapersView.currentIndex === index ? 0 : Kirigami.Units.smallSpacing
|
||||||
Behavior on scaleAmount {
|
Behavior on scaleAmount {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: imageWallpaperDrawer.previewAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on padding {
|
Behavior on padding {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: imageWallpaperDrawer.previewAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ Controls.AbstractButton {
|
||||||
|
|
||||||
property int shrinkSize: 0
|
property int shrinkSize: 0
|
||||||
property alias iconSource: icon.source
|
property alias iconSource: icon.source
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
|
|
||||||
MobileShell.HapticsEffect {
|
MobileShell.HapticsEffect {
|
||||||
id: haptics
|
id: haptics
|
||||||
|
|
@ -57,10 +56,10 @@ Controls.AbstractButton {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
id: opacityAnimator
|
id: opacityAnimator
|
||||||
type: MobileShell.Motion.Press
|
duration: Kirigami.Units.shortDuration
|
||||||
duration: button.pressAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
onFinished: {
|
onFinished: {
|
||||||
// animate the state back
|
// animate the state back
|
||||||
if (rect.buttonHeld && opacityAnimator.to === 0) {
|
if (rect.buttonHeld && opacityAnimator.to === 0) {
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,6 @@ Window {
|
||||||
property int angle: 0
|
property int angle: 0
|
||||||
property string iconSource
|
property string iconSource
|
||||||
property bool active: false
|
property bool active: false
|
||||||
readonly property int buttonAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
|
||||||
readonly property real hiddenScale: MobileShell.Motion.hiddenScale
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleOut
|
|
||||||
|
|
||||||
signal triggered()
|
signal triggered()
|
||||||
|
|
||||||
|
|
@ -85,7 +82,7 @@ Window {
|
||||||
// Hide the root window after the button disappearing animation finishes.
|
// Hide the root window after the button disappearing animation finishes.
|
||||||
Timer {
|
Timer {
|
||||||
id: hideButton
|
id: hideButton
|
||||||
interval: root.buttonAnimationDuration
|
interval: Kirigami.Units.longDuration
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: if (!active) root.visible = false;
|
onTriggered: if (!active) root.visible = false;
|
||||||
}
|
}
|
||||||
|
|
@ -104,14 +101,20 @@ Window {
|
||||||
height: root.size
|
height: root.size
|
||||||
opacity: root.active ? 1 : 0
|
opacity: root.active ? 1 : 0
|
||||||
|
|
||||||
property double scale: !root.active ? root.hiddenScale : (button.pressed ? root.pressedScale : 1)
|
property double scale: !root.active ? 0.5 : (button.pressed ? 1.5 : 1)
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.StandardDecel }
|
NumberAnimation {
|
||||||
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutBack
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.StandardDecel }
|
NumberAnimation {
|
||||||
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutCirc
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
@ -130,20 +133,12 @@ Window {
|
||||||
Controls.AbstractButton {
|
Controls.AbstractButton {
|
||||||
id: button
|
id: button
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
MobileShell.HapticsEffect {
|
MobileShell.HapticsEffect {
|
||||||
id: haptics
|
id: haptics
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
MobileShell.MotionStateLayer {
|
|
||||||
anchors.fill: parent
|
|
||||||
radius: root.size
|
|
||||||
hovered: button.hovered
|
|
||||||
pressed: button.pressed
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: Kirigami.Units.iconSizes.small
|
width: Kirigami.Units.iconSizes.small
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,6 @@ Item {
|
||||||
property int popupWidth
|
property int popupWidth
|
||||||
property real openOffset
|
property real openOffset
|
||||||
property bool isConvergence: false
|
property bool isConvergence: false
|
||||||
readonly property int primaryAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 1.5)
|
|
||||||
readonly property int secondaryAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow)
|
|
||||||
readonly property int stackAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 1.25)
|
|
||||||
readonly property int stackMomentumAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 0.5)
|
|
||||||
|
|
||||||
// In convergence the popup enters from the bottom-right corner
|
// In convergence the popup enters from the bottom-right corner
|
||||||
readonly property real effectiveOpenOffset: isConvergence
|
readonly property real effectiveOpenOffset: isConvergence
|
||||||
|
|
@ -58,7 +54,7 @@ Item {
|
||||||
// due to it not looking great to have a notification sliding up while another one is sliding down
|
// due to it not looking great to have a notification sliding up while another one is sliding down
|
||||||
// we use a timer so that the current notification can know to use "closeWithScale" instead
|
// we use a timer so that the current notification can know to use "closeWithScale" instead
|
||||||
property Timer queueTimer: Timer {
|
property Timer queueTimer: Timer {
|
||||||
interval: notificationPopup.secondaryAnimationDuration
|
interval: Kirigami.Units.veryLongDuration
|
||||||
running: true
|
running: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
visible = true;
|
visible = true;
|
||||||
|
|
@ -117,9 +113,9 @@ Item {
|
||||||
// animate the notifications entering and exiting the expanded drawer
|
// animate the notifications entering and exiting the expanded drawer
|
||||||
property real fullOffsetAn: fullOpenOffset
|
property real fullOffsetAn: fullOpenOffset
|
||||||
Behavior on fullOffsetAn {
|
Behavior on fullOffsetAn {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationPopup.primaryAnimationDuration
|
duration: Kirigami.Units.veryLongDuration * 1.5
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -129,21 +125,21 @@ Item {
|
||||||
// animate this value so that the popup in some situations will not jump around
|
// animate this value so that the popup in some situations will not jump around
|
||||||
property real scaleOriginY: inPopupDrawer && !popupDrawerOpened ? popupNotifications.currentPopupHeight : Math.round(popupHeight / 2)
|
property real scaleOriginY: inPopupDrawer && !popupDrawerOpened ? popupNotifications.currentPopupHeight : Math.round(popupHeight / 2)
|
||||||
Behavior on scaleOriginY {
|
Behavior on scaleOriginY {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationPopup.secondaryAnimationDuration
|
duration: Kirigami.Units.veryLongDuration
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the vertical drag offset for the notification popup
|
// the vertical drag offset for the notification popup
|
||||||
// we drag is released, animate back to 0
|
// we drag is released, animate back to 0
|
||||||
property real dragOffset: 0
|
property real dragOffset: 0
|
||||||
MobileShell.MotionNumberAnimation on dragOffset {
|
NumberAnimation on dragOffset {
|
||||||
id: dragOffsetAn
|
id: dragOffsetAn
|
||||||
running: false
|
running: false
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.SpatialSlow
|
duration: Kirigami.Units.veryLongDuration * 1.5
|
||||||
duration: notificationPopup.primaryAnimationDuration
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the popup height ever changes, update the notification below with new height
|
// if the popup height ever changes, update the notification below with new height
|
||||||
|
|
@ -389,21 +385,21 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on drawerScale {
|
Behavior on drawerScale {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationPopup.stackAnimationDuration
|
duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
type: MobileShell.Motion.Emphasized
|
easing.type: Easing.OutQuint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on drawerAddedOffset {
|
Behavior on drawerAddedOffset {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationPopup.stackAnimationDuration
|
duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
type: MobileShell.Motion.Emphasized
|
easing.type: Easing.OutQuint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on drawerOpacity {
|
Behavior on drawerOpacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationPopup.stackAnimationDuration
|
duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
type: MobileShell.Motion.Emphasized
|
easing.type: Easing.OutQuint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -491,30 +487,27 @@ Item {
|
||||||
if (notificationPopup.closedWithSwipe || (topPopup && popupClosing && popupBelow)) {
|
if (notificationPopup.closedWithSwipe || (topPopup && popupClosing && popupBelow)) {
|
||||||
// make sure the speed it faster when closed with a swipe or if there is a popup below when closing
|
// make sure the speed it faster when closed with a swipe or if there is a popup below when closing
|
||||||
// as to make sure the speed feels comparable with the easing type is set to linear
|
// as to make sure the speed feels comparable with the easing type is set to linear
|
||||||
return notificationPopup.stackMomentumAnimationDuration;
|
return Kirigami.Units.veryLongDuration * 0.5;
|
||||||
} else {
|
} else {
|
||||||
return notificationPopup.stackAnimationDuration;
|
return Kirigami.Units.veryLongDuration * 1.25;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "offset"
|
properties: "offset"
|
||||||
type: MobileShell.Motion.SpatialSlow
|
|
||||||
easing.type: notificationItem.notificationEasing
|
easing.type: notificationItem.notificationEasing
|
||||||
duration: notificationItem.notificationDuration
|
duration: notificationItem.notificationDuration
|
||||||
}
|
}
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "scale"
|
properties: "scale"
|
||||||
type: MobileShell.Motion.SpatialSlow
|
|
||||||
easing.type: notificationItem.notificationEasing
|
easing.type: notificationItem.notificationEasing
|
||||||
duration: notificationItem.notificationDuration
|
duration: notificationItem.notificationDuration
|
||||||
}
|
}
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "popupOpacity"
|
properties: "popupOpacity"
|
||||||
type: MobileShell.Motion.SpatialSlow
|
|
||||||
easing.type: notificationItem.notificationEasing
|
easing.type: notificationItem.notificationEasing
|
||||||
duration: notificationItem.notificationDuration
|
duration: notificationItem.notificationDuration
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ Window {
|
||||||
// Margin between popup and screen edge in convergence mode; used in both
|
// Margin between popup and screen edge in convergence mode; used in both
|
||||||
// the delegate x position and the input-region calculation so they stay in sync.
|
// the delegate x position and the input-region calculation so they stay in sync.
|
||||||
readonly property real convergencePopupMargin: Kirigami.Units.gridUnit * 2
|
readonly property real convergencePopupMargin: Kirigami.Units.gridUnit * 2
|
||||||
readonly property int popupAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 1.5)
|
|
||||||
property var keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
|
property var keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
|
||||||
|
|
||||||
LayerShell.Window.scope: "notification"
|
LayerShell.Window.scope: "notification"
|
||||||
|
|
@ -61,9 +60,9 @@ Window {
|
||||||
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
||||||
color: popupDrawerOpened && visible ? backgroundColor : "transparent"
|
color: popupDrawerOpened && visible ? backgroundColor : "transparent"
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation {
|
ColorAnimation {
|
||||||
duration: notificationPopupManager.popupAnimationDuration
|
duration: Kirigami.Units.veryLongDuration * 1.5
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,7 +82,7 @@ Window {
|
||||||
// hide on timeout to give time to finish animations
|
// hide on timeout to give time to finish animations
|
||||||
Timer {
|
Timer {
|
||||||
id: hideTimeout
|
id: hideTimeout
|
||||||
interval: notificationPopupManager.popupAnimationDuration
|
interval: Kirigami.Units.veryLongDuration * 1.5
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: if (notifications.count == 0) notificationPopupManager.visible = false;
|
onTriggered: if (notifications.count == 0) notificationPopupManager.visible = false;
|
||||||
}
|
}
|
||||||
|
|
@ -154,12 +153,12 @@ Window {
|
||||||
resetContentY.running = true;
|
resetContentY.running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on contentY {
|
NumberAnimation on contentY {
|
||||||
id: resetContentY
|
id: resetContentY
|
||||||
running: false
|
running: false
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.SpatialSlow
|
duration: Kirigami.Units.veryLongDuration * 1.5
|
||||||
duration: notificationPopupManager.popupAnimationDuration
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import org.kde.kquickcontrolsaddons
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.components as PlasmaComponents
|
import org.kde.plasma.components as PlasmaComponents
|
||||||
import org.kde.plasma.extras as PlasmaExtras
|
import org.kde.plasma.extras as PlasmaExtras
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.volume
|
import org.kde.plasma.private.volume
|
||||||
|
|
||||||
import "icon.js" as Icon
|
import "icon.js" as Icon
|
||||||
|
|
@ -25,8 +24,6 @@ import "icon.js" as Icon
|
||||||
Controls.AbstractButton {
|
Controls.AbstractButton {
|
||||||
id: baseItem
|
id: baseItem
|
||||||
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
property string label
|
property string label
|
||||||
property alias listIcon: clientIcon.source
|
property alias listIcon: clientIcon.source
|
||||||
property string type // sink, source, source-output
|
property string type // sink, source, source-output
|
||||||
|
|
@ -49,15 +46,9 @@ Controls.AbstractButton {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: "transparent"
|
color: (baseItem.down)
|
||||||
|
? Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.3)
|
||||||
MobileShell.MotionStateLayer {
|
: 'transparent'
|
||||||
anchors.fill: parent
|
|
||||||
radius: parent.radius
|
|
||||||
hovered: baseItem.hovered
|
|
||||||
pressed: baseItem.down
|
|
||||||
active: baseItem.selected
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
|
@ -202,11 +193,12 @@ Controls.AbstractButton {
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: seqAnimation
|
id: seqAnimation
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: toAnimation
|
id: toAnimation
|
||||||
target: slider
|
target: slider
|
||||||
property: "to"
|
property: "to"
|
||||||
type: MobileShell.Motion.EffectsFast
|
duration: Kirigami.Units.shortDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
script: slider.updateVolume()
|
script: slider.updateVolume()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ Window {
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
readonly property int popupAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 1.25)
|
|
||||||
|
|
||||||
function showOverlay() {
|
function showOverlay() {
|
||||||
if (cards.state == "closed") {
|
if (cards.state == "closed") {
|
||||||
|
|
@ -117,10 +116,8 @@ Window {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "offset"
|
properties: "offset"; easing.type: cards.state == "open" ? Easing.OutQuint : Easing.InQuint; duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
type: cards.state == "open" ? MobileShell.Motion.Emphasized : MobileShell.Motion.EmphasizedAccel
|
|
||||||
duration: window.popupAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ Window {
|
||||||
LayerShell.Window.exclusionZone: -1
|
LayerShell.Window.exclusionZone: -1
|
||||||
|
|
||||||
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
readonly property color backgroundColor: Qt.darker(Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.95), 1.05)
|
||||||
readonly property int overlayAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow) * 1.25)
|
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
@ -84,7 +83,7 @@ Window {
|
||||||
pressDelay: 50
|
pressDelay: 50
|
||||||
|
|
||||||
property real offset: -Kirigami.Units.gridUnit
|
property real offset: -Kirigami.Units.gridUnit
|
||||||
property real cardScale: 0.95
|
property real scale: 0.95
|
||||||
|
|
||||||
state: "closed"
|
state: "closed"
|
||||||
|
|
||||||
|
|
@ -95,7 +94,7 @@ Window {
|
||||||
target: flickable; offset: 0
|
target: flickable; offset: 0
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: flickable; cardScale: 1.0
|
target: flickable; scale: 1.0
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: flickable; opacity: 1.0
|
target: flickable; opacity: 1.0
|
||||||
|
|
@ -110,7 +109,7 @@ Window {
|
||||||
target: flickable; offset: -Kirigami.Units.gridUnit * 3
|
target: flickable; offset: -Kirigami.Units.gridUnit * 3
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: flickable; cardScale: 0.95
|
target: flickable; scale: 0.95
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: flickable; opacity: 0.0
|
target: flickable; opacity: 0.0
|
||||||
|
|
@ -124,17 +123,17 @@ Window {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "offset"; type: MobileShell.Motion.Emphasized; duration: window.overlayAnimationDuration
|
properties: "offset"; easing.type: Easing.OutQuint; duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
}
|
}
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "cardScale"; type: MobileShell.Motion.Emphasized; duration: window.overlayAnimationDuration
|
properties: "scale"; easing.type: Easing.OutQuint; duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
}
|
}
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "opacity"; type: MobileShell.Motion.Emphasized; duration: window.overlayAnimationDuration
|
properties: "opacity"; easing.type: Easing.OutQuint; duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
}
|
}
|
||||||
MobileShell.MotionColorAnimation {
|
PropertyAnimation {
|
||||||
properties: "color"; type: MobileShell.Motion.Emphasized; duration: window.overlayAnimationDuration
|
properties: "color"; easing.type: Easing.OutQuint; duration: Kirigami.Units.veryLongDuration * 1.25
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
@ -173,7 +172,7 @@ Window {
|
||||||
Layout.topMargin: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 3
|
Layout.topMargin: Kirigami.Units.gridUnit + Kirigami.Units.smallSpacing * 3
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.preferredWidth: cards.width
|
Layout.preferredWidth: cards.width
|
||||||
scale: flickable.cardScale
|
scale: flickable.scale
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupCard {
|
PopupCard {
|
||||||
|
|
@ -181,7 +180,7 @@ Window {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.bottomMargin: Kirigami.Units.gridUnit
|
Layout.bottomMargin: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
scaleFactor: flickable.cardScale
|
scaleFactor: flickable.scale
|
||||||
|
|
||||||
contentItem: PlasmaComponents.ToolButton {
|
contentItem: PlasmaComponents.ToolButton {
|
||||||
id: audioSettingsButton
|
id: audioSettingsButton
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import org.kde.kquickcontrolsaddons
|
||||||
import org.kde.plasma.components as PC3
|
import org.kde.plasma.components as PC3
|
||||||
import org.kde.ksvg as KSvg
|
import org.kde.ksvg as KSvg
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.volume
|
import org.kde.plasma.private.volume
|
||||||
|
|
||||||
// Audio volume slider. Value represents desired volume level in
|
// Audio volume slider. Value represents desired volume level in
|
||||||
|
|
@ -22,7 +21,6 @@ PC3.Slider {
|
||||||
id: control
|
id: control
|
||||||
|
|
||||||
property VolumeObject volumeObject
|
property VolumeObject volumeObject
|
||||||
readonly property real mutedOpacity: 0.55
|
|
||||||
|
|
||||||
// When muted, the whole slider will appear slightly faded, but remain
|
// When muted, the whole slider will appear slightly faded, but remain
|
||||||
// functional and interactive.
|
// functional and interactive.
|
||||||
|
|
@ -39,20 +37,22 @@ PC3.Slider {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on volume {
|
Behavior on volume {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: animate
|
id: animate
|
||||||
type: MobileShell.Motion.EffectsFast
|
duration: Kirigami.Units.shortDuration
|
||||||
|
easing.type: Easing.OutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When a maximum volume limit is raised/lower, animate the change.
|
// When a maximum volume limit is raised/lower, animate the change.
|
||||||
Behavior on to {
|
Behavior on to {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.EffectsFast
|
duration: Kirigami.Units.shortDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: muted ? mutedOpacity : 1
|
opacity: muted ? 0.5 : 1
|
||||||
// Prevents the groove from showing through the handle
|
// Prevents the groove from showing through the handle
|
||||||
layer.enabled: opacity < 1
|
layer.enabled: opacity < 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Item {
|
||||||
property color backgroundColor: "transparent"
|
property color backgroundColor: "transparent"
|
||||||
|
|
||||||
Behavior on backgroundColor {
|
Behavior on backgroundColor {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast }
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -101,7 +101,7 @@ Item {
|
||||||
opacity: ShellSettings.Settings.convergenceModeEnabled && statusBarHover.hovered ? 1 : 0
|
opacity: ShellSettings.Settings.convergenceModeEnabled && statusBarHover.hovered ? 1 : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -240,7 +240,7 @@ Item {
|
||||||
opacity: ShellSettings.Settings.convergenceModeEnabled ? (statusBarHover.hovered ? 0.6 : 0.2) : 0
|
opacity: ShellSettings.Settings.convergenceModeEnabled ? (statusBarHover.hovered ? 0.6 : 0.2) : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast }
|
NumberAnimation { duration: Kirigami.Units.shortDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,22 +7,20 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls as Controls
|
import QtQuick.Controls as Controls
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: taskIcon
|
id: taskIcon
|
||||||
width: parent.height
|
width: parent.height
|
||||||
height: width
|
height: width
|
||||||
readonly property int opacityAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
// Hide ApplicationStatus and Passive items
|
// Hide ApplicationStatus and Passive items
|
||||||
opacity: (model.category !== "ApplicationStatus" && model.status !== "Passive") ? 1 : 0
|
opacity: (model.category !== "ApplicationStatus" && model.status !== "Passive") ? 1 : 0
|
||||||
onOpacityChanged: visible = opacity
|
onOpacityChanged: visible = opacity
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: taskIcon.opacityAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,9 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
|
|
||||||
import org.kde.milou as Milou
|
import org.kde.milou as Milou
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: root
|
id: root
|
||||||
Kirigami.Theme.inherit: false
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
|
||||||
|
|
||||||
readonly property color fieldColor: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.10)
|
|
||||||
readonly property color fieldActiveColor: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.20)
|
|
||||||
readonly property color resultHoverColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.16)
|
|
||||||
readonly property color resultPressedColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
onClicked: root.requestedClose(false)
|
onClicked: root.requestedClose(false)
|
||||||
|
|
||||||
function requestFocus() {
|
function requestFocus() {
|
||||||
|
|
@ -63,9 +54,9 @@ MouseArea {
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: (queryField.hovered || queryField.focus) ? root.fieldActiveColor : root.fieldColor
|
color: Qt.rgba(255, 255, 255, (queryField.hovered || queryField.focus) ? 0.2 : 0.1)
|
||||||
|
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast } }
|
Behavior on color { ColorAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
@ -75,8 +66,8 @@ MouseArea {
|
||||||
bottomPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
bottomPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
||||||
|
|
||||||
placeholderText: i18nc("@info:placeholder", "Search…")
|
placeholderText: i18nc("@info:placeholder", "Search…")
|
||||||
placeholderTextColor: Kirigami.Theme.disabledTextColor
|
placeholderTextColor: Qt.rgba(255, 255, 255, 0.8)
|
||||||
color: Kirigami.Theme.textColor
|
color: 'white'
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText // don't need to press "enter" to update text
|
inputMethodHints: Qt.ImhNoPredictiveText // don't need to press "enter" to update text
|
||||||
|
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
|
|
@ -142,7 +133,7 @@ MouseArea {
|
||||||
type: Kirigami.Heading.Primary
|
type: Kirigami.Heading.Primary
|
||||||
text: sectionHeader.section
|
text: sectionHeader.section
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
color: Kirigami.Theme.textColor
|
color: 'white'
|
||||||
|
|
||||||
// we override the Primary type's font weight (DemiBold) for Bold for contrast with small text
|
// we override the Primary type's font weight (DemiBold) for Bold for contrast with small text
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
|
|
@ -185,7 +176,7 @@ MouseArea {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: delegate.pressed ? root.resultPressedColor : (delegate.containsMouse ? root.resultHoverColor : "transparent")
|
color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.3) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.1) : "transparent")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -220,7 +211,7 @@ MouseArea {
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: typeof modelData !== "undefined" ? modelData : model.display
|
text: typeof modelData !== "undefined" ? modelData : model.display
|
||||||
color: Kirigami.Theme.textColor
|
color: "white"
|
||||||
|
|
||||||
font.pointSize: Kirigami.Theme.defaultFont.pointSize
|
font.pointSize: Kirigami.Theme.defaultFont.pointSize
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +224,7 @@ MouseArea {
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: model.subtext || ""
|
text: model.subtext || ""
|
||||||
color: Kirigami.Theme.textColor
|
color: "white"
|
||||||
opacity: 0.8
|
opacity: 0.8
|
||||||
|
|
||||||
font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize * 0.8)
|
font.pointSize: Math.round(Kirigami.Theme.defaultFont.pointSize * 0.8)
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,9 @@ Item {
|
||||||
implicitHeight: visible ? padding * 2 + contentHeight : 0
|
implicitHeight: visible ? padding * 2 + contentHeight : 0
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.StandardDecel
|
duration: implicitHeight == 0 ? 0 : Kirigami.Units.longDuration
|
||||||
duration: implicitHeight == 0 ? 0 : MobileShell.Motion.duration(type)
|
easing.type: Easing.OutQuart
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,6 @@ Item {
|
||||||
* The current drag offset for this notification.
|
* The current drag offset for this notification.
|
||||||
*/
|
*/
|
||||||
property real dragOffset: 0
|
property real dragOffset: 0
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
|
||||||
readonly property int veryLongAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow)
|
|
||||||
|
|
||||||
signal tapped()
|
signal tapped()
|
||||||
signal dismissRequested()
|
signal dismissRequested()
|
||||||
|
|
@ -86,10 +84,10 @@ Item {
|
||||||
|
|
||||||
implicitHeight: contentParent.implicitHeight
|
implicitHeight: contentParent.implicitHeight
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on dragOffset {
|
NumberAnimation on dragOffset {
|
||||||
id: dragAnim
|
id: dragAnim
|
||||||
type: MobileShell.Motion.StandardDecel
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.longAnimationDuration
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (to !== 0) {
|
if (to !== 0) {
|
||||||
root.dismissRequested();
|
root.dismissRequested();
|
||||||
|
|
@ -114,9 +112,9 @@ Item {
|
||||||
|
|
||||||
implicitHeight: inPopupDrawer ? currentPopupHeight : contentParent.implicitHeight
|
implicitHeight: inPopupDrawer ? currentPopupHeight : contentParent.implicitHeight
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: root.veryLongAnimationDuration
|
duration: Kirigami.Units.veryLongDuration
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,9 +129,9 @@ Item {
|
||||||
|
|
||||||
opacity: closeTimerRunning ? 1 : 0
|
opacity: closeTimerRunning ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
type: MobileShell.Motion.StandardDecel
|
easing.type: Easing.OutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,12 @@ import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: actionContainer
|
id: actionContainer
|
||||||
|
|
||||||
required property BaseNotificationItem notification
|
required property BaseNotificationItem notification
|
||||||
property bool popupNotification: false
|
property bool popupNotification: false
|
||||||
readonly property int transitionDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
|
||||||
|
|
||||||
implicitHeight: Math.max(actionFlow.implicitHeight, replyLoader.height)
|
implicitHeight: Math.max(actionFlow.implicitHeight, replyLoader.height)
|
||||||
visible: actionRepeater.count > 0
|
visible: actionRepeater.count > 0
|
||||||
|
|
@ -33,9 +31,9 @@ Item {
|
||||||
opacity: replyLoader.active ? 0 : 1
|
opacity: replyLoader.active ? 0 : 1
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: actionContainer.transitionDuration
|
duration: Kirigami.Units.longDuration
|
||||||
type: MobileShell.Motion.Standard
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -96,15 +94,15 @@ Item {
|
||||||
property bool replying: false
|
property bool replying: false
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: actionContainer.transitionDuration
|
duration: Kirigami.Units.longDuration
|
||||||
type: MobileShell.Motion.Standard
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: actionContainer.transitionDuration
|
duration: Kirigami.Units.longDuration
|
||||||
type: MobileShell.Motion.Standard
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ BaseNotificationItem {
|
||||||
|
|
||||||
property bool inLockScreen: false
|
property bool inLockScreen: false
|
||||||
property int panelType: MobileShell.PanelBackground.PanelType.Drawer
|
property int panelType: MobileShell.PanelBackground.PanelType.Drawer
|
||||||
readonly property int popupFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow)
|
|
||||||
|
|
||||||
signal dragStart()
|
signal dragStart()
|
||||||
signal dragEnd()
|
signal dragEnd()
|
||||||
|
|
@ -70,9 +69,9 @@ BaseNotificationItem {
|
||||||
|
|
||||||
opacity: notificationItem.inPopupDrawer ? 0 : 1
|
opacity: notificationItem.inPopupDrawer ? 0 : 1
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
duration: notificationItem.popupFadeDuration
|
duration: Kirigami.Units.veryLongDuration
|
||||||
type: MobileShell.Motion.SpatialSlow
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.plasma.clock
|
import org.kde.plasma.clock
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
import org.kde.plasma.components 3.0 as PlasmaComponents3
|
||||||
|
|
@ -189,7 +190,7 @@ Item {
|
||||||
|
|
||||||
property NotificationItem pendingNotificationWithAction: null
|
property NotificationItem pendingNotificationWithAction: null
|
||||||
|
|
||||||
readonly property int animationDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
readonly property int animationDuration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
||||||
|
|
||||||
// If a screen overflow occurs, fix height in order to maintain tool buttons in place.
|
// If a screen overflow occurs, fix height in order to maintain tool buttons in place.
|
||||||
readonly property bool listOverflowing: listHeight + spacing >= root.height
|
readonly property bool listOverflowing: listHeight + spacing >= root.height
|
||||||
|
|
@ -270,11 +271,11 @@ Item {
|
||||||
|
|
||||||
// Run every time an item is visually added to the list, thus when `Show n more` button is clicked as well.
|
// Run every time an item is visually added to the list, thus when `Show n more` button is clicked as well.
|
||||||
add: Transition {
|
add: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; from: 0; to: 1; duration: list.animationDuration; type: MobileShell.Motion.Standard }
|
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: list.animationDuration }
|
||||||
}
|
}
|
||||||
// Run every time an item is displaced, such as when the order is scrambled due to a group expansion.
|
// Run every time an item is displaced, such as when the order is scrambled due to a group expansion.
|
||||||
displaced: Transition {
|
displaced: Transition {
|
||||||
MobileShell.MotionNumberAnimation { properties: "y"; duration: list.animationDuration; type: MobileShell.Motion.Standard }
|
NumberAnimation { properties: "y"; duration: list.animationDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRowExpanded(row) {
|
function isRowExpanded(row) {
|
||||||
|
|
@ -324,7 +325,7 @@ Item {
|
||||||
// We have to do this here in order to control the animation before the item is completely removed
|
// We have to do this here in order to control the animation before the item is completely removed
|
||||||
ListView.onRemove: SequentialAnimation {
|
ListView.onRemove: SequentialAnimation {
|
||||||
PropertyAction { target: delegateLoader; property: "ListView.delayRemove"; value: true }
|
PropertyAction { target: delegateLoader; property: "ListView.delayRemove"; value: true }
|
||||||
MobileShell.MotionNumberAnimation { target: delegateLoader; property: "opacity"; to: 0.0; duration: list.animationDuration; type: MobileShell.Motion.Standard }
|
NumberAnimation { target: delegateLoader; property: "opacity"; to: 0.0; duration: list.animationDuration }
|
||||||
PropertyAction { target: delegateLoader; property: "ListView.delayRemove"; value: false }
|
PropertyAction { target: delegateLoader; property: "ListView.delayRemove"; value: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -419,7 +420,7 @@ Item {
|
||||||
to: "VISIBLE"
|
to: "VISIBLE"
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PauseAnimation { duration: list.animationDuration * 2 }
|
PauseAnimation { duration: list.animationDuration * 2 }
|
||||||
MobileShell.MotionNumberAnimation { properties: "opacity"; duration: list.animationDuration; type: MobileShell.Motion.Standard }
|
NumberAnimation { properties: "opacity"; duration: list.animationDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ MobileShellSettings::MobileShellSettings(QObject *parent)
|
||||||
Q_EMIT gamingDismissHintEnabledChanged();
|
Q_EMIT gamingDismissHintEnabledChanged();
|
||||||
Q_EMIT dynamicTilingEnabledChanged();
|
Q_EMIT dynamicTilingEnabledChanged();
|
||||||
Q_EMIT dynamicTilingWindowRequestChanged();
|
Q_EMIT dynamicTilingWindowRequestChanged();
|
||||||
Q_EMIT dynamicTilingWindowStateChanged();
|
|
||||||
Q_EMIT snapLayoutsEnabledChanged();
|
Q_EMIT snapLayoutsEnabledChanged();
|
||||||
Q_EMIT allowLogoutChanged();
|
Q_EMIT allowLogoutChanged();
|
||||||
}
|
}
|
||||||
|
|
@ -327,50 +326,6 @@ void MobileShellSettings::requestDynamicTilingWindowAction(const QString &window
|
||||||
Q_EMIT dynamicTilingWindowRequestChanged();
|
Q_EMIT dynamicTilingWindowRequestChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MobileShellSettings::dynamicTilingMaximizedWindowIds() const
|
|
||||||
{
|
|
||||||
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
|
|
||||||
return group.readEntry("dynamicTilingMaximizedWindowIds", QStringList{});
|
|
||||||
}
|
|
||||||
|
|
||||||
int MobileShellSettings::dynamicTilingWindowStateSerial() const
|
|
||||||
{
|
|
||||||
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
|
|
||||||
return group.readEntry("dynamicTilingWindowStateSerial", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MobileShellSettings::isDynamicTilingWindowMaximized(const QString &windowId) const
|
|
||||||
{
|
|
||||||
if (windowId.isEmpty()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return dynamicTilingMaximizedWindowIds().contains(windowId);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MobileShellSettings::reportDynamicTilingWindowState(const QStringList &maximizedWindowIds)
|
|
||||||
{
|
|
||||||
QStringList normalizedIds;
|
|
||||||
for (const QString &windowId : maximizedWindowIds) {
|
|
||||||
if (!windowId.isEmpty() && !normalizedIds.contains(windowId)) {
|
|
||||||
normalizedIds.push_back(windowId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
normalizedIds.sort(Qt::CaseSensitive);
|
|
||||||
|
|
||||||
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
|
|
||||||
if (group.readEntry("dynamicTilingMaximizedWindowIds", QStringList{}) == normalizedIds) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const int serial = group.readEntry("dynamicTilingWindowStateSerial", 0) + 1;
|
|
||||||
group.writeEntry("dynamicTilingMaximizedWindowIds", normalizedIds, KConfigGroup::Notify);
|
|
||||||
group.writeEntry("dynamicTilingWindowStateSerial", serial, KConfigGroup::Notify);
|
|
||||||
m_config->sync();
|
|
||||||
|
|
||||||
Q_EMIT dynamicTilingWindowStateChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MobileShellSettings::snapLayoutsEnabled() const
|
bool MobileShellSettings::snapLayoutsEnabled() const
|
||||||
{
|
{
|
||||||
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
|
auto group = KConfigGroup{m_config, GENERAL_CONFIG_GROUP};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QStringList>
|
|
||||||
#include <qqmlregistration.h>
|
#include <qqmlregistration.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -63,8 +62,6 @@ class MobileShellSettings : public QObject
|
||||||
Q_PROPERTY(QString dynamicTilingWindowRequestAction READ dynamicTilingWindowRequestAction NOTIFY dynamicTilingWindowRequestChanged)
|
Q_PROPERTY(QString dynamicTilingWindowRequestAction READ dynamicTilingWindowRequestAction NOTIFY dynamicTilingWindowRequestChanged)
|
||||||
Q_PROPERTY(QString dynamicTilingWindowRequestId READ dynamicTilingWindowRequestId NOTIFY dynamicTilingWindowRequestChanged)
|
Q_PROPERTY(QString dynamicTilingWindowRequestId READ dynamicTilingWindowRequestId NOTIFY dynamicTilingWindowRequestChanged)
|
||||||
Q_PROPERTY(int dynamicTilingWindowRequestSerial READ dynamicTilingWindowRequestSerial NOTIFY dynamicTilingWindowRequestChanged)
|
Q_PROPERTY(int dynamicTilingWindowRequestSerial READ dynamicTilingWindowRequestSerial NOTIFY dynamicTilingWindowRequestChanged)
|
||||||
Q_PROPERTY(QStringList dynamicTilingMaximizedWindowIds READ dynamicTilingMaximizedWindowIds NOTIFY dynamicTilingWindowStateChanged)
|
|
||||||
Q_PROPERTY(int dynamicTilingWindowStateSerial READ dynamicTilingWindowStateSerial NOTIFY dynamicTilingWindowStateChanged)
|
|
||||||
|
|
||||||
// Snap layout picker — only meaningful in convergence mode when dynamic tiling is off.
|
// Snap layout picker — only meaningful in convergence mode when dynamic tiling is off.
|
||||||
Q_PROPERTY(bool snapLayoutsEnabled READ snapLayoutsEnabled WRITE setSnapLayoutsEnabled NOTIFY snapLayoutsEnabledChanged)
|
Q_PROPERTY(bool snapLayoutsEnabled READ snapLayoutsEnabled WRITE setSnapLayoutsEnabled NOTIFY snapLayoutsEnabledChanged)
|
||||||
|
|
@ -298,10 +295,6 @@ public:
|
||||||
QString dynamicTilingWindowRequestId() const;
|
QString dynamicTilingWindowRequestId() const;
|
||||||
int dynamicTilingWindowRequestSerial() const;
|
int dynamicTilingWindowRequestSerial() const;
|
||||||
Q_INVOKABLE void requestDynamicTilingWindowAction(const QString &windowId, const QString &action);
|
Q_INVOKABLE void requestDynamicTilingWindowAction(const QString &windowId, const QString &action);
|
||||||
QStringList dynamicTilingMaximizedWindowIds() const;
|
|
||||||
int dynamicTilingWindowStateSerial() const;
|
|
||||||
Q_INVOKABLE bool isDynamicTilingWindowMaximized(const QString &windowId) const;
|
|
||||||
Q_INVOKABLE void reportDynamicTilingWindowState(const QStringList &maximizedWindowIds);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the SHIFT snap layout picker is enabled.
|
* Whether the SHIFT snap layout picker is enabled.
|
||||||
|
|
@ -361,7 +354,6 @@ Q_SIGNALS:
|
||||||
void gamingDismissHintEnabledChanged();
|
void gamingDismissHintEnabledChanged();
|
||||||
void dynamicTilingEnabledChanged();
|
void dynamicTilingEnabledChanged();
|
||||||
void dynamicTilingWindowRequestChanged();
|
void dynamicTilingWindowRequestChanged();
|
||||||
void dynamicTilingWindowStateChanged();
|
|
||||||
void snapLayoutsEnabledChanged();
|
void snapLayoutsEnabledChanged();
|
||||||
void allowLogoutChanged();
|
void allowLogoutChanged();
|
||||||
void lockscreenLeftButtonActionChanged();
|
void lockscreenLeftButtonActionChanged();
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,7 @@ ApplicationListModel::ApplicationListModel(HomeScreen *parent)
|
||||||
m_reloadAppsTimer->setInterval(100ms);
|
m_reloadAppsTimer->setInterval(100ms);
|
||||||
connect(m_reloadAppsTimer, &QTimer::timeout, this, &ApplicationListModel::sycocaDbChanged);
|
connect(m_reloadAppsTimer, &QTimer::timeout, this, &ApplicationListModel::sycocaDbChanged);
|
||||||
|
|
||||||
if (!qEnvironmentVariableIsSet("SHIFT_PREVIEW_DISABLE_SYCOCA_WATCH")) {
|
|
||||||
connect(KSycoca::self(), &KSycoca::databaseChanged, m_reloadAppsTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
connect(KSycoca::self(), &KSycoca::databaseChanged, m_reloadAppsTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||||
}
|
|
||||||
|
|
||||||
// initialize wayland window checking
|
// initialize wayland window checking
|
||||||
KWayland::Client::ConnectionThread *connection = KWayland::Client::ConnectionThread::fromApplication(this);
|
KWayland::Client::ConnectionThread *connection = KWayland::Client::ConnectionThread::fromApplication(this);
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ MobileShell.GridView {
|
||||||
property real headerHeight
|
property real headerHeight
|
||||||
|
|
||||||
readonly property int reservedSpaceForLabel: folio.HomeScreenState.pageDelegateLabelHeight
|
readonly property int reservedSpaceForLabel: folio.HomeScreenState.pageDelegateLabelHeight
|
||||||
readonly property int scrollBarAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialExtended)
|
|
||||||
readonly property real effectiveContentWidth: width - leftMargin - rightMargin
|
readonly property real effectiveContentWidth: width - leftMargin - rightMargin
|
||||||
readonly property real horizontalMargin: Math.round(width * 0.05)
|
readonly property real horizontalMargin: Math.round(width * 0.05)
|
||||||
|
|
||||||
|
|
@ -140,8 +139,8 @@ MobileShell.GridView {
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
duration: root.scrollBarAnimationDuration
|
duration: Kirigami.Units.longDuration * 2
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Standard)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import QtQuick.Layouts
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
||||||
import './delegate'
|
import './delegate'
|
||||||
|
|
||||||
|
|
@ -65,7 +64,7 @@ Item {
|
||||||
Kirigami.Theme.textColor.b,
|
Kirigami.Theme.textColor.b,
|
||||||
(searchField.hovered || searchField.focus) ? 0.2 : 0.1)
|
(searchField.hovered || searchField.focus) ? 0.2 : 0.1)
|
||||||
|
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast } }
|
Behavior on color { ColorAnimation {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
topPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
topPadding: Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ Item {
|
||||||
height: folio.HomeScreenState.pageCellHeight
|
height: folio.HomeScreenState.pageCellHeight
|
||||||
|
|
||||||
readonly property real dropAnimationRunning: dragXAnim.running || dragYAnim.running
|
readonly property real dropAnimationRunning: dragXAnim.running || dragYAnim.running
|
||||||
readonly property int dropAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
// ignore widget dragging, that is not handled by this component
|
// ignore widget dragging, that is not handled by this component
|
||||||
readonly property bool isWidgetDrag: folio.HomeScreenState.dragState.dropDelegate && folio.HomeScreenState.dragState.dropDelegate.type === Folio.FolioDelegate.Widget
|
readonly property bool isWidgetDrag: folio.HomeScreenState.dragState.dropDelegate && folio.HomeScreenState.dragState.dropDelegate.type === Folio.FolioDelegate.Widget
|
||||||
|
|
@ -39,11 +38,11 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// animate drop x
|
// animate drop x
|
||||||
MobileShell.MotionNumberAnimation on x {
|
NumberAnimation on x {
|
||||||
id: dragXAnim
|
id: dragXAnim
|
||||||
type: MobileShell.Motion.EffectsDefault
|
|
||||||
running: false
|
running: false
|
||||||
duration: root.dropAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
root.setXBinding();
|
root.setXBinding();
|
||||||
|
|
@ -51,11 +50,11 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
// animate drop y
|
// animate drop y
|
||||||
MobileShell.MotionNumberAnimation on y {
|
NumberAnimation on y {
|
||||||
id: dragYAnim
|
id: dragYAnim
|
||||||
type: MobileShell.Motion.EffectsDefault
|
|
||||||
running: false
|
running: false
|
||||||
duration: root.dropAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
root.setYBinding();
|
root.setYBinding();
|
||||||
|
|
@ -67,8 +66,8 @@ Item {
|
||||||
id: scaleAnim
|
id: scaleAnim
|
||||||
to: 0
|
to: 0
|
||||||
running: false
|
running: false
|
||||||
duration: root.dropAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutCubic
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
||||||
|
|
@ -35,22 +35,20 @@ MouseArea {
|
||||||
readonly property bool convergenceMode: ShellSettings.Settings.convergenceModeEnabled
|
readonly property bool convergenceMode: ShellSettings.Settings.convergenceModeEnabled
|
||||||
readonly property bool showRunningTasks: convergenceMode && !suppressRunningTasks
|
readonly property bool showRunningTasks: convergenceMode && !suppressRunningTasks
|
||||||
readonly property int totalItemCount: repeater.count + (showRunningTasks ? taskRepeater.count : 0)
|
readonly property int totalItemCount: repeater.count + (showRunningTasks ? taskRepeater.count : 0)
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
// In convergence mode, size icons to fit the dock bar instead of using page grid cells
|
// In convergence mode, size icons to fit the dock bar instead of using page grid cells
|
||||||
property real dockCellWidth: convergenceMode ? root.height : folio.HomeScreenState.pageCellWidth
|
property real dockCellWidth: convergenceMode ? root.height : folio.HomeScreenState.pageCellWidth
|
||||||
property real dockCellHeight: convergenceMode ? root.height : folio.HomeScreenState.pageCellHeight
|
property real dockCellHeight: convergenceMode ? root.height : folio.HomeScreenState.pageCellHeight
|
||||||
Behavior on dockCellWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on dockCellWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on dockCellHeight { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on dockCellHeight { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
|
|
||||||
// Navigation buttons width (used to offset center positioning)
|
// Navigation buttons width (used to offset center positioning)
|
||||||
property real navButtonWidth: convergenceMode ? root.height : 0
|
property real navButtonWidth: convergenceMode ? root.height : 0
|
||||||
property real dockItemInset: convergenceMode ? Math.max(2, Kirigami.Units.smallSpacing / 2) : 0
|
property real dockItemInset: convergenceMode ? Math.max(2, Kirigami.Units.smallSpacing / 2) : 0
|
||||||
property real dockIconSize: Math.min(root.height * 0.56, Kirigami.Units.iconSizes.large)
|
property real dockIconSize: Math.min(root.height * 0.56, Kirigami.Units.iconSizes.large)
|
||||||
Behavior on navButtonWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on navButtonWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on dockItemInset { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on dockItemInset { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on dockIconSize { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on dockIconSize { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
|
|
||||||
function dockItemColor(pressed, hovered, active) {
|
function dockItemColor(pressed, hovered, active) {
|
||||||
if (pressed) {
|
if (pressed) {
|
||||||
|
|
@ -69,7 +67,7 @@ MouseArea {
|
||||||
readonly property bool showSpacer: showRunningTasks && repeater.count > 0 && taskRepeater.count > 0
|
readonly property bool showSpacer: showRunningTasks && repeater.count > 0 && taskRepeater.count > 0
|
||||||
property real spacerWidth: showSpacer ? Kirigami.Units.largeSpacing * 2 : 0
|
property real spacerWidth: showSpacer ? Kirigami.Units.largeSpacing * 2 : 0
|
||||||
Behavior on spacerWidth {
|
Behavior on spacerWidth {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thumbnail popup hover tracking
|
// Thumbnail popup hover tracking
|
||||||
|
|
@ -104,10 +102,10 @@ MouseArea {
|
||||||
readonly property real dockCenterX: convergenceMode
|
readonly property real dockCenterX: convergenceMode
|
||||||
? leftControlsWidth + (root.width - leftControlsWidth - rightControlsWidth) / 2
|
? leftControlsWidth + (root.width - leftControlsWidth - rightControlsWidth) / 2
|
||||||
: root.width / 2
|
: root.width / 2
|
||||||
Behavior on pagerButtonWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on pagerButtonWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on desktopButtonWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on desktopButtonWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on trashButtonWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on trashButtonWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
Behavior on searchButtonWidth { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on searchButtonWidth { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutCubic } }
|
||||||
|
|
||||||
property Item pendingDockToolTipItem: null
|
property Item pendingDockToolTipItem: null
|
||||||
property Item activeDockToolTipItem: null
|
property Item activeDockToolTipItem: null
|
||||||
|
|
@ -179,27 +177,6 @@ MouseArea {
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
function desktopIndexForId(desktopId) {
|
|
||||||
let ids = virtualDesktopInfo.desktopIds
|
|
||||||
if (!ids) {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
for (let i = 0; i < ids.length; ++i) {
|
|
||||||
if (String(ids[i]) === String(desktopId)) {
|
|
||||||
return i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
function dynamicTilingMoveToDesktopAction(desktopId) {
|
|
||||||
let index = root.desktopIndexForId(desktopId)
|
|
||||||
if (index < 0) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return "move-to-desktop:" + String(desktopId) + "|" + String(index + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
function taskActivities(taskModel) {
|
function taskActivities(taskModel) {
|
||||||
let activities = taskModel.Activities
|
let activities = taskModel.Activities
|
||||||
return activities ? activities : []
|
return activities ? activities : []
|
||||||
|
|
@ -317,7 +294,7 @@ MouseArea {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
|
|
@ -336,13 +313,15 @@ MouseArea {
|
||||||
visible: homeButton.activeFocus
|
visible: homeButton.activeFocus
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: homeMouseArea.containsMouse
|
color: root.dockItemColor(homeMouseArea.containsPress, homeMouseArea.containsMouse, false)
|
||||||
pressed: homeMouseArea.containsPress
|
|
||||||
pressedOpacity: 0.18
|
Behavior on color {
|
||||||
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -382,7 +361,7 @@ MouseArea {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
|
|
@ -406,14 +385,15 @@ MouseArea {
|
||||||
visible: desktopButton.activeFocus
|
visible: desktopButton.activeFocus
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: desktopMouseArea.containsMouse
|
color: root.dockItemColor(desktopMouseArea.containsPress, desktopMouseArea.containsMouse, WindowPlugin.WindowUtil.isShowingDesktop)
|
||||||
pressed: desktopMouseArea.containsPress
|
|
||||||
active: WindowPlugin.WindowUtil.isShowingDesktop
|
Behavior on color {
|
||||||
pressedOpacity: 0.18
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -496,7 +476,7 @@ MouseArea {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
|
|
@ -515,13 +495,15 @@ MouseArea {
|
||||||
visible: overviewButton.activeFocus
|
visible: overviewButton.activeFocus
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: overviewMouseArea.containsMouse
|
color: root.dockItemColor(overviewMouseArea.containsPress, overviewMouseArea.containsMouse, false)
|
||||||
pressed: overviewMouseArea.containsPress
|
|
||||||
pressedOpacity: 0.18
|
Behavior on color {
|
||||||
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -557,7 +539,7 @@ MouseArea {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
|
|
@ -581,13 +563,15 @@ MouseArea {
|
||||||
visible: searchButton.activeFocus
|
visible: searchButton.activeFocus
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: searchMouseArea.containsMouse
|
color: root.dockItemColor(searchMouseArea.containsPress, searchMouseArea.containsMouse, false)
|
||||||
pressed: searchMouseArea.containsPress
|
|
||||||
pressedOpacity: 0.18
|
Behavior on color {
|
||||||
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -654,16 +638,15 @@ MouseArea {
|
||||||
width: root.pagerButtonWidth
|
width: root.pagerButtonWidth
|
||||||
height: root.height
|
height: root.height
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: leftPagerHover.containsMouse
|
color: leftDesktopBtn.isCurrent || leftDesktopBtn.isDragTarget
|
||||||
pressed: leftPagerHover.containsPress
|
? Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b,
|
||||||
active: leftDesktopBtn.isCurrent || leftDesktopBtn.isDragTarget
|
leftPagerHover.containsMouse || leftDesktopBtn.isDragTarget ? 0.25 : 0.18)
|
||||||
pressedOpacity: 0.18
|
: root.dockItemColor(leftPagerHover.containsPress, leftPagerHover.containsMouse, false)
|
||||||
activeOpacity: 0.18
|
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
|
||||||
activeHoverOpacity: 0.25
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PC3.Label {
|
PC3.Label {
|
||||||
|
|
@ -763,16 +746,15 @@ MouseArea {
|
||||||
width: root.pagerButtonWidth
|
width: root.pagerButtonWidth
|
||||||
height: root.height
|
height: root.height
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: rightPagerHover.containsMouse
|
color: rightDesktopBtn.isCurrent || rightDesktopBtn.isDragTarget
|
||||||
pressed: rightPagerHover.containsPress
|
? Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b,
|
||||||
active: rightDesktopBtn.isCurrent || rightDesktopBtn.isDragTarget
|
rightPagerHover.containsMouse || rightDesktopBtn.isDragTarget ? 0.25 : 0.18)
|
||||||
pressedOpacity: 0.18
|
: root.dockItemColor(rightPagerHover.containsPress, rightPagerHover.containsMouse, false)
|
||||||
activeOpacity: 0.18
|
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
|
||||||
activeHoverOpacity: 0.25
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PC3.Label {
|
PC3.Label {
|
||||||
|
|
@ -893,7 +875,7 @@ MouseArea {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
|
|
@ -909,13 +891,14 @@ MouseArea {
|
||||||
visible: trashButton.activeFocus
|
visible: trashButton.activeFocus
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionStateLayer {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.dockItemInset
|
anchors.margins: root.dockItemInset
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
hovered: trashMouseArea.containsMouse
|
color: root.dockItemColor(trashMouseArea.containsPress, trashMouseArea.containsMouse, false)
|
||||||
pressed: trashMouseArea.containsPress
|
Behavior on color {
|
||||||
pressedOpacity: 0.18
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -1066,7 +1049,7 @@ MouseArea {
|
||||||
// get the normalized index position value from the center so we can animate it
|
// get the normalized index position value from the center so we can animate it
|
||||||
property double fromCenterValue: model.index - (root.totalItemCount / 2)
|
property double fromCenterValue: model.index - (root.totalItemCount / 2)
|
||||||
Behavior on fromCenterValue {
|
Behavior on fromCenterValue {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// multiply the 'fromCenterValue' by the cell size to get the actual position
|
// multiply the 'fromCenterValue' by the cell size to get the actual position
|
||||||
|
|
@ -1087,7 +1070,7 @@ MouseArea {
|
||||||
}
|
}
|
||||||
Behavior on dragVisualShift {
|
Behavior on dragVisualShift {
|
||||||
enabled: root.dragReorderIndex !== -1 && delegate.index !== root.dragReorderIndex
|
enabled: root.dragReorderIndex !== -1 && delegate.index !== root.dragReorderIndex
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
property real taskPinVisualShift: root.taskPinCanDrop && delegate.index >= root.taskPinTargetIndex ? root.dockCellWidth : 0
|
property real taskPinVisualShift: root.taskPinCanDrop && delegate.index >= root.taskPinTargetIndex ? root.dockCellWidth : 0
|
||||||
|
|
@ -1443,10 +1426,10 @@ MouseArea {
|
||||||
visible: showing || fadeAnim.running
|
visible: showing || fadeAnim.running
|
||||||
opacity: showing ? 1 : 0
|
opacity: showing ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: fadeAnim
|
id: fadeAnim
|
||||||
type: MobileShell.Motion.EffectsFast
|
duration: Kirigami.Units.shortDuration
|
||||||
duration: root.shortAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1691,15 +1674,8 @@ MouseArea {
|
||||||
readonly property bool dynamicTilingActive: root.convergenceMode && ShellSettings.Settings.dynamicTilingEnabled
|
readonly property bool dynamicTilingActive: root.convergenceMode && ShellSettings.Settings.dynamicTilingEnabled
|
||||||
readonly property bool showFreeGeometryActions: !taskDelegate.isGroupParent && !taskDelegate.dynamicTilingActive
|
readonly property bool showFreeGeometryActions: !taskDelegate.isGroupParent && !taskDelegate.dynamicTilingActive
|
||||||
readonly property bool canRequestDynamicTiling: taskDelegate.dynamicTilingActive && !taskDelegate.isGroupParent && root.taskWindowId(taskDelegate.model) !== ""
|
readonly property bool canRequestDynamicTiling: taskDelegate.dynamicTilingActive && !taskDelegate.isGroupParent && root.taskWindowId(taskDelegate.model) !== ""
|
||||||
readonly property int dynamicTilingWindowStateSerial: ShellSettings.Settings.dynamicTilingWindowStateSerial
|
|
||||||
readonly property bool dynamicTilingMaximized: taskDelegate.canRequestDynamicTiling
|
|
||||||
&& taskDelegate.dynamicTilingWindowStateSerial >= 0
|
|
||||||
&& ShellSettings.Settings.isDynamicTilingWindowMaximized(root.taskWindowId(taskDelegate.model))
|
|
||||||
readonly property bool canChangeVirtualDesktops: taskDelegate.model.IsVirtualDesktopsChangeable === true
|
readonly property bool canChangeVirtualDesktops: taskDelegate.model.IsVirtualDesktopsChangeable === true
|
||||||
readonly property bool canChangeActivities: activityInfo.numberOfRunningActivities > 1 && !taskDelegate.isGroupParent
|
readonly property bool canChangeActivities: activityInfo.numberOfRunningActivities > 1 && !taskDelegate.isGroupParent
|
||||||
readonly property bool dynamicTilingAllActivities: taskDelegate.canRequestDynamicTiling && root.taskActivities(taskDelegate.model).length === 0
|
|
||||||
readonly property bool canShowActivityScopeAction: taskDelegate.canChangeActivities && (!taskDelegate.canRequestDynamicTiling || taskDelegate.dynamicTilingAllActivities)
|
|
||||||
readonly property bool canShowActivityMoveActions: taskDelegate.canChangeActivities && !taskDelegate.canRequestDynamicTiling
|
|
||||||
|
|
||||||
Accessible.role: Accessible.Button
|
Accessible.role: Accessible.Button
|
||||||
Accessible.name: taskDelegate.model.display || ""
|
Accessible.name: taskDelegate.model.display || ""
|
||||||
|
|
@ -1723,25 +1699,6 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function requestMoveToDesktop(desktopId) {
|
|
||||||
if (taskDelegate.canRequestDynamicTiling) {
|
|
||||||
let action = root.dynamicTilingMoveToDesktopAction(desktopId)
|
|
||||||
if (action !== "") {
|
|
||||||
ShellSettings.Settings.requestDynamicTilingWindowAction(root.taskWindowId(taskDelegate.model), action)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasksModel.requestVirtualDesktops(tasksModel.makeModelIndex(taskDelegate.index), [desktopId])
|
|
||||||
}
|
|
||||||
|
|
||||||
function requestMoveToNewDesktop() {
|
|
||||||
if (taskDelegate.canRequestDynamicTiling) {
|
|
||||||
ShellSettings.Settings.requestDynamicTilingWindowAction(root.taskWindowId(taskDelegate.model), "move-to-new-desktop")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
tasksModel.requestNewVirtualDesktop(tasksModel.makeModelIndex(taskDelegate.index))
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onReturnPressed: taskDelegate.activateTask()
|
Keys.onReturnPressed: taskDelegate.activateTask()
|
||||||
Keys.onEnterPressed: taskDelegate.activateTask()
|
Keys.onEnterPressed: taskDelegate.activateTask()
|
||||||
Keys.onSpacePressed: taskDelegate.activateTask()
|
Keys.onSpacePressed: taskDelegate.activateTask()
|
||||||
|
|
@ -1761,7 +1718,7 @@ MouseArea {
|
||||||
// Position after all favourites
|
// Position after all favourites
|
||||||
property double fromCenterValue: (repeater.count + taskDelegate.index) - (root.totalItemCount / 2)
|
property double fromCenterValue: (repeater.count + taskDelegate.index) - (root.totalItemCount / 2)
|
||||||
Behavior on fromCenterValue {
|
Behavior on fromCenterValue {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad; }
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property int centerPosition: (isLocationBottom ? root.dockCellWidth : root.dockCellHeight) * fromCenterValue
|
readonly property int centerPosition: (isLocationBottom ? root.dockCellWidth : root.dockCellHeight) * fromCenterValue
|
||||||
|
|
@ -1783,7 +1740,7 @@ MouseArea {
|
||||||
color: root.dockItemColor(taskMouseArea.containsPress, taskMouseArea.containsMouse, taskDelegate.model.IsActive === true)
|
color: root.dockItemColor(taskMouseArea.containsPress, taskMouseArea.containsMouse, taskDelegate.model.IsActive === true)
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1801,22 +1758,6 @@ MouseArea {
|
||||||
active: taskMouseArea.containsMouse
|
active: taskMouseArea.containsMouse
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
visible: opacity > 0
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
anchors.topMargin: Kirigami.Units.smallSpacing
|
|
||||||
width: Kirigami.Units.smallSpacing * 3
|
|
||||||
height: Math.max(2, Math.round(Kirigami.Units.devicePixelRatio))
|
|
||||||
radius: height / 2
|
|
||||||
color: Kirigami.Theme.highlightColor
|
|
||||||
opacity: taskDelegate.dynamicTilingMaximized ? 0.95 : 0
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DragHandler {
|
DragHandler {
|
||||||
id: taskDragHandler
|
id: taskDragHandler
|
||||||
target: null
|
target: null
|
||||||
|
|
@ -1841,7 +1782,7 @@ MouseArea {
|
||||||
let finalCenterX = root.taskBaseX(taskDelegate.index) + root.dockCellWidth / 2 + root.taskPinDragOffset
|
let finalCenterX = root.taskBaseX(taskDelegate.index) + root.dockCellWidth / 2 + root.taskPinDragOffset
|
||||||
let pagerDesktop = root.pagerButtonDesktopAt(finalCenterX)
|
let pagerDesktop = root.pagerButtonDesktopAt(finalCenterX)
|
||||||
if (pagerDesktop && taskDelegate.model.IsVirtualDesktopsChangeable === true) {
|
if (pagerDesktop && taskDelegate.model.IsVirtualDesktopsChangeable === true) {
|
||||||
taskDelegate.requestMoveToDesktop(pagerDesktop)
|
tasksModel.requestVirtualDesktops(tasksModel.makeModelIndex(taskDelegate.index), [pagerDesktop])
|
||||||
} else if (root.taskPinCanDrop && !folio.FavouritesModel.containsApplication(root.taskPinStorageId)) {
|
} else if (root.taskPinCanDrop && !folio.FavouritesModel.containsApplication(root.taskPinStorageId)) {
|
||||||
folio.FavouritesModel.addApplicationAt(root.taskPinTargetIndex, root.taskPinStorageId)
|
folio.FavouritesModel.addApplicationAt(root.taskPinTargetIndex, root.taskPinStorageId)
|
||||||
}
|
}
|
||||||
|
|
@ -1884,7 +1825,7 @@ MouseArea {
|
||||||
opacity: taskDelegate.model.IsActive === true ? 1.0 : 0.45
|
opacity: taskDelegate.model.IsActive === true ? 1.0 : 0.45
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1981,15 +1922,6 @@ MouseArea {
|
||||||
onClicked: ShellSettings.Settings.requestDynamicTilingWindowAction(root.taskWindowId(taskDelegate.model), "tile")
|
onClicked: ShellSettings.Settings.requestDynamicTilingWindowAction(root.taskWindowId(taskDelegate.model), "tile")
|
||||||
}
|
}
|
||||||
|
|
||||||
PC3.MenuItem {
|
|
||||||
icon.name: taskDelegate.dynamicTilingMaximized ? "window-restore" : "window-maximize"
|
|
||||||
text: taskDelegate.dynamicTilingMaximized ? i18n("Restore") : i18n("Maximize")
|
|
||||||
visible: taskDelegate.canRequestDynamicTiling
|
|
||||||
height: visible ? implicitHeight : 0
|
|
||||||
enabled: taskDelegate.model.IsMaximizable === true
|
|
||||||
onClicked: ShellSettings.Settings.requestDynamicTilingWindowAction(root.taskWindowId(taskDelegate.model), "maximize-toggle")
|
|
||||||
}
|
|
||||||
|
|
||||||
PC3.MenuItem {
|
PC3.MenuItem {
|
||||||
icon.name: "transform-move"
|
icon.name: "transform-move"
|
||||||
text: i18n("Move")
|
text: i18n("Move")
|
||||||
|
|
@ -2060,26 +1992,19 @@ MouseArea {
|
||||||
PC3.MenuItem {
|
PC3.MenuItem {
|
||||||
icon.name: "virtual-desktops"
|
icon.name: "virtual-desktops"
|
||||||
text: taskDelegate.model.IsOnAllVirtualDesktops ? i18n("Show Only on Current Desktop") : i18n("Show on All Desktops")
|
text: taskDelegate.model.IsOnAllVirtualDesktops ? i18n("Show Only on Current Desktop") : i18n("Show on All Desktops")
|
||||||
visible: taskDelegate.canChangeVirtualDesktops
|
visible: taskDelegate.canChangeVirtualDesktops && virtualDesktopInfo.numberOfDesktops > 1
|
||||||
&& virtualDesktopInfo.numberOfDesktops > 1
|
|
||||||
&& (!taskDelegate.dynamicTilingActive || taskDelegate.model.IsOnAllVirtualDesktops === true)
|
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
onClicked: {
|
onClicked: tasksModel.requestVirtualDesktops(tasksModel.makeModelIndex(taskDelegate.index),
|
||||||
if (taskDelegate.dynamicTilingActive && taskDelegate.model.IsOnAllVirtualDesktops === true) {
|
|
||||||
taskDelegate.requestMoveToDesktop(virtualDesktopInfo.currentDesktop)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
tasksModel.requestVirtualDesktops(tasksModel.makeModelIndex(taskDelegate.index),
|
|
||||||
taskDelegate.model.IsOnAllVirtualDesktops ? [virtualDesktopInfo.currentDesktop] : [])
|
taskDelegate.model.IsOnAllVirtualDesktops ? [virtualDesktopInfo.currentDesktop] : [])
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Instantiator {
|
Instantiator {
|
||||||
model: root.showPager && taskDelegate.canChangeVirtualDesktops ? root.menuDesktopIds(taskDelegate.model.IsOnAllVirtualDesktops === true) : []
|
model: root.showPager && taskDelegate.canChangeVirtualDesktops ? root.menuDesktopIds(taskDelegate.model.IsOnAllVirtualDesktops === true) : []
|
||||||
delegate: PC3.MenuItem {
|
delegate: PC3.MenuItem {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
text: i18n("Move to %1", root.pagerDesktopNameForId(modelData))
|
text: i18n("Move to %1", root.pagerDesktopNameForId(modelData))
|
||||||
onTriggered: taskDelegate.requestMoveToDesktop(modelData)
|
onTriggered: tasksModel.requestVirtualDesktops(
|
||||||
|
tasksModel.makeModelIndex(taskDelegate.index), [modelData])
|
||||||
}
|
}
|
||||||
onObjectAdded: (idx, obj) => taskContextMenu.insertItem(taskContextMenu.count, obj)
|
onObjectAdded: (idx, obj) => taskContextMenu.insertItem(taskContextMenu.count, obj)
|
||||||
onObjectRemoved: (idx, obj) => taskContextMenu.removeItem(obj)
|
onObjectRemoved: (idx, obj) => taskContextMenu.removeItem(obj)
|
||||||
|
|
@ -2089,25 +2014,25 @@ MouseArea {
|
||||||
text: i18n("Move to New Desktop")
|
text: i18n("Move to New Desktop")
|
||||||
visible: taskDelegate.canChangeVirtualDesktops
|
visible: taskDelegate.canChangeVirtualDesktops
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
onClicked: taskDelegate.requestMoveToNewDesktop()
|
onClicked: tasksModel.requestNewVirtualDesktop(tasksModel.makeModelIndex(taskDelegate.index))
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.MenuSeparator {
|
Controls.MenuSeparator {
|
||||||
visible: taskDelegate.canShowActivityScopeAction || taskDelegate.canShowActivityMoveActions
|
visible: taskDelegate.canChangeActivities
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
PC3.MenuItem {
|
PC3.MenuItem {
|
||||||
icon.name: "activities"
|
icon.name: "activities"
|
||||||
text: root.taskActivities(taskDelegate.model).length === 0 ? i18n("Show Only on Current Activity") : i18n("Show on All Activities")
|
text: root.taskActivities(taskDelegate.model).length === 0 ? i18n("Show Only on Current Activity") : i18n("Show on All Activities")
|
||||||
visible: taskDelegate.canShowActivityScopeAction
|
visible: taskDelegate.canChangeActivities
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
onClicked: tasksModel.requestActivities(tasksModel.makeModelIndex(taskDelegate.index),
|
onClicked: tasksModel.requestActivities(tasksModel.makeModelIndex(taskDelegate.index),
|
||||||
root.taskActivities(taskDelegate.model).length === 0 ? [activityInfo.currentActivity] : [])
|
root.taskActivities(taskDelegate.model).length === 0 ? [activityInfo.currentActivity] : [])
|
||||||
}
|
}
|
||||||
|
|
||||||
Instantiator {
|
Instantiator {
|
||||||
model: taskDelegate.canShowActivityMoveActions ? root.menuActivityIds(root.taskActivities(taskDelegate.model)) : []
|
model: taskDelegate.canChangeActivities ? root.menuActivityIds(root.taskActivities(taskDelegate.model)) : []
|
||||||
delegate: PC3.MenuItem {
|
delegate: PC3.MenuItem {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
icon.name: activityInfo.activityIcon(modelData)
|
icon.name: activityInfo.activityIcon(modelData)
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,6 @@ Folio.DelegateTouchArea {
|
||||||
property real folderPositionY
|
property real folderPositionY
|
||||||
|
|
||||||
property Folio.FolioApplicationFolder folder: folio.HomeScreenState.currentFolder
|
property Folio.FolioApplicationFolder folder: folio.HomeScreenState.currentFolder
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property color folderFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.24)
|
|
||||||
|
|
||||||
MobileShell.HapticsEffect {
|
MobileShell.HapticsEffect {
|
||||||
id: haptics
|
id: haptics
|
||||||
|
|
@ -86,7 +83,7 @@ Folio.DelegateTouchArea {
|
||||||
|
|
||||||
opacity: (root.opacity === 1) ? 1 : 0
|
opacity: (root.opacity === 1) ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -180,7 +177,7 @@ Folio.DelegateTouchArea {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: folderBackground
|
id: folderBackground
|
||||||
color: root.folderFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
radius: Kirigami.Units.gridUnit
|
radius: Kirigami.Units.gridUnit
|
||||||
|
|
||||||
readonly property int gridLength: folio.HomeScreenState.folderGridLength
|
readonly property int gridLength: folio.HomeScreenState.folderGridLength
|
||||||
|
|
@ -285,9 +282,9 @@ Folio.DelegateTouchArea {
|
||||||
property double rowValue: model.rowIndex
|
property double rowValue: model.rowIndex
|
||||||
property double pageValue: model.pageIndex
|
property double pageValue: model.pageIndex
|
||||||
|
|
||||||
Behavior on columnValue { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on columnValue { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } }
|
||||||
Behavior on rowValue { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on rowValue { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } }
|
||||||
Behavior on pageValue { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.longAnimationDuration } }
|
Behavior on pageValue { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } }
|
||||||
|
|
||||||
// multiply the index values by the cell size to get the actual position
|
// multiply the index values by the cell size to get the actual position
|
||||||
readonly property int columnPosition: cellWidth * columnValue
|
readonly property int columnPosition: cellWidth * columnValue
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ Item {
|
||||||
property real rightMargin: 0
|
property real rightMargin: 0
|
||||||
|
|
||||||
property bool interactive: true
|
property bool interactive: true
|
||||||
readonly property color favouritesBarScrimColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.14)
|
|
||||||
|
|
||||||
// non-widget drop animation
|
// non-widget drop animation
|
||||||
readonly property bool dropAnimationRunning: delegateDragItem.dropAnimationRunning || widgetDragItem.dropAnimationRunning
|
readonly property bool dropAnimationRunning: delegateDragItem.dropAnimationRunning || widgetDragItem.dropAnimationRunning
|
||||||
|
|
@ -351,7 +350,7 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: favouritesBarScrim
|
id: favouritesBarScrim
|
||||||
color: root.favouritesBarScrimColor
|
color: Qt.rgba(255, 255, 255, 0.2)
|
||||||
|
|
||||||
Component.onCompleted: maskManager.assignToMask(this)
|
Component.onCompleted: maskManager.assignToMask(this)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@ Item {
|
||||||
|
|
||||||
property var pageModel
|
property var pageModel
|
||||||
property var homeScreen
|
property var homeScreen
|
||||||
readonly property color editFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.24)
|
|
||||||
readonly property color dropFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
onActiveFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
if (activeFocus) {
|
if (activeFocus) {
|
||||||
|
|
@ -109,7 +107,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: settingsViewBackground
|
id: settingsViewBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: root.editFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.2)
|
||||||
opacity: folio.HomeScreenState.settingsOpenProgress
|
opacity: folio.HomeScreenState.settingsOpenProgress
|
||||||
radius: Kirigami.Units.largeSpacing
|
radius: Kirigami.Units.largeSpacing
|
||||||
}
|
}
|
||||||
|
|
@ -154,7 +152,7 @@ Item {
|
||||||
pageModel.canAddDelegate(dropPosition.pageRow, dropPosition.pageColumn, dropDelegate)
|
pageModel.canAddDelegate(dropPosition.pageRow, dropPosition.pageColumn, dropDelegate)
|
||||||
|
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: root.dropFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
|
|
||||||
x: dropPosition.pageColumn * folio.HomeScreenState.pageCellWidth
|
x: dropPosition.pageColumn * folio.HomeScreenState.pageCellWidth
|
||||||
y: dropPosition.pageRow * folio.HomeScreenState.pageCellHeight
|
y: dropPosition.pageRow * folio.HomeScreenState.pageCellHeight
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import "./delegate"
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
property Folio.HomeScreen folio
|
property Folio.HomeScreen folio
|
||||||
readonly property color placeholderColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
width: folio.HomeScreenState.pageCellWidth
|
width: folio.HomeScreenState.pageCellWidth
|
||||||
height: folio.HomeScreenState.pageCellHeight
|
height: folio.HomeScreenState.pageCellHeight
|
||||||
|
|
@ -25,7 +24,7 @@ Item {
|
||||||
// icon position placement
|
// icon position placement
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: loader
|
id: loader
|
||||||
color: root.placeholderColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,6 @@ import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
||||||
import org.kde.taskmanager as TaskManager
|
import org.kde.taskmanager as TaskManager
|
||||||
|
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
||||||
|
|
@ -18,7 +16,6 @@ Item {
|
||||||
required property var folio
|
required property var folio
|
||||||
|
|
||||||
readonly property bool hasTasks: allTasksModel.count > 0
|
readonly property bool hasTasks: allTasksModel.count > 0
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
property bool sortByName: false
|
property bool sortByName: false
|
||||||
property int dragTargetDesktopIndex: -1
|
property int dragTargetDesktopIndex: -1
|
||||||
property string pendingMoveTaskKey: ""
|
property string pendingMoveTaskKey: ""
|
||||||
|
|
@ -47,18 +44,6 @@ Item {
|
||||||
return String(taskModel ? taskModel.AppId || "" : "") + "|" + String(taskModel ? taskModel.display || "" : "")
|
return String(taskModel ? taskModel.AppId || "" : "") + "|" + String(taskModel ? taskModel.display || "" : "")
|
||||||
}
|
}
|
||||||
|
|
||||||
function taskWindowId(taskModel) {
|
|
||||||
const winIds = taskModel && taskModel.WinIdList ? taskModel.WinIdList : []
|
|
||||||
return winIds.length === 1 ? String(winIds[0]) : ""
|
|
||||||
}
|
|
||||||
|
|
||||||
function dynamicTilingMoveToDesktopAction(desktopId, desktopIndex) {
|
|
||||||
if (String(desktopId).length === 0 || desktopIndex < 0) {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return "move-to-desktop:" + String(desktopId) + "|" + String(desktopIndex + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
function markTaskMove(taskKey, desktopIndex) {
|
function markTaskMove(taskKey, desktopIndex) {
|
||||||
pendingMoveTaskKey = taskKey
|
pendingMoveTaskKey = taskKey
|
||||||
pendingMoveTargetName = desktopName(desktopIndex)
|
pendingMoveTargetName = desktopName(desktopIndex)
|
||||||
|
|
@ -295,10 +280,10 @@ Item {
|
||||||
: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.14)
|
: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.14)
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -386,18 +371,11 @@ Item {
|
||||||
readonly property int previewCount: Math.max(1, Math.min(2, winIds.length))
|
readonly property int previewCount: Math.max(1, Math.min(2, winIds.length))
|
||||||
readonly property bool activeTask: model.IsActive === true
|
readonly property bool activeTask: model.IsActive === true
|
||||||
readonly property bool minimizedTask: model.IsMinimized === true
|
readonly property bool minimizedTask: model.IsMinimized === true
|
||||||
|
readonly property bool maximizedTask: model.IsMaximized === true
|
||||||
readonly property bool groupTask: model.IsGroupParent === true
|
readonly property bool groupTask: model.IsGroupParent === true
|
||||||
readonly property bool desktopsChangeable: model.IsVirtualDesktopsChangeable === true
|
readonly property bool desktopsChangeable: model.IsVirtualDesktopsChangeable === true
|
||||||
readonly property string storageId: root.taskStorageId(model)
|
readonly property string storageId: root.taskStorageId(model)
|
||||||
readonly property string taskKey: root.taskKey(model)
|
readonly property string taskKey: root.taskKey(model)
|
||||||
readonly property string windowId: root.taskWindowId(model)
|
|
||||||
readonly property bool dynamicTilingActive: ShellSettings.Settings.convergenceModeEnabled && ShellSettings.Settings.dynamicTilingEnabled
|
|
||||||
readonly property bool canRequestDynamicTiling: dynamicTilingActive && !groupTask && windowId !== ""
|
|
||||||
readonly property int dynamicTilingWindowStateSerial: ShellSettings.Settings.dynamicTilingWindowStateSerial
|
|
||||||
readonly property bool dynamicTilingMaximized: canRequestDynamicTiling
|
|
||||||
&& dynamicTilingWindowStateSerial >= 0
|
|
||||||
&& ShellSettings.Settings.isDynamicTilingWindowMaximized(windowId)
|
|
||||||
readonly property bool maximizedTask: model.IsMaximized === true || dynamicTilingMaximized
|
|
||||||
readonly property bool pinned: storageId !== "" && root.folio.FavouritesModel.containsApplication(storageId)
|
readonly property bool pinned: storageId !== "" && root.folio.FavouritesModel.containsApplication(storageId)
|
||||||
readonly property bool pendingMove: root.pendingMoveTaskKey === taskKey
|
readonly property bool pendingMove: root.pendingMoveTaskKey === taskKey
|
||||||
|
|
||||||
|
|
@ -425,13 +403,6 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
root.markTaskMove(taskCard.taskKey, desktopIndex)
|
root.markTaskMove(taskCard.taskKey, desktopIndex)
|
||||||
if (taskCard.canRequestDynamicTiling) {
|
|
||||||
const action = root.dynamicTilingMoveToDesktopAction(desktopId, desktopIndex)
|
|
||||||
if (action !== "") {
|
|
||||||
ShellSettings.Settings.requestDynamicTilingWindowAction(taskCard.windowId, action)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tasksModel.requestVirtualDesktops(taskCard.modelIndex, [desktopId])
|
tasksModel.requestVirtualDesktops(taskCard.modelIndex, [desktopId])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -538,7 +509,7 @@ Item {
|
||||||
: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.12)
|
: root.mixColor(Kirigami.Theme.backgroundColor, Kirigami.Theme.textColor, 0.12)
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -692,13 +663,7 @@ Item {
|
||||||
iconName: taskCard.maximizedTask ? "window-restore" : "window-maximize"
|
iconName: taskCard.maximizedTask ? "window-restore" : "window-maximize"
|
||||||
toolTipText: taskCard.maximizedTask ? i18n("Restore") : i18n("Maximize")
|
toolTipText: taskCard.maximizedTask ? i18n("Restore") : i18n("Maximize")
|
||||||
enabled: !taskCard.groupTask
|
enabled: !taskCard.groupTask
|
||||||
onTriggered: {
|
onTriggered: tasksModel.requestToggleMaximized(taskCard.modelIndex)
|
||||||
if (taskCard.canRequestDynamicTiling) {
|
|
||||||
ShellSettings.Settings.requestDynamicTilingWindowAction(taskCard.windowId, "maximize-toggle")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
tasksModel.requestToggleMaximized(taskCard.modelIndex)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RunningAppsPanelButton {
|
RunningAppsPanelButton {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import QtQuick
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: button
|
id: button
|
||||||
|
|
@ -13,7 +12,6 @@ MouseArea {
|
||||||
property string iconName
|
property string iconName
|
||||||
property string toolTipText
|
property string toolTipText
|
||||||
property bool checked: false
|
property bool checked: false
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
signal triggered()
|
signal triggered()
|
||||||
|
|
||||||
|
|
@ -45,7 +43,7 @@ MouseArea {
|
||||||
: "transparent"
|
: "transparent"
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: button.shortAnimationDuration }
|
ColorAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.ksvg 1.0 as KSvg
|
import org.kde.ksvg 1.0 as KSvg
|
||||||
|
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
||||||
|
|
||||||
import './delegate'
|
import './delegate'
|
||||||
|
|
@ -32,7 +31,6 @@ Item {
|
||||||
&& folio.HomeScreenState.dragState.dropDelegate.type === Folio.FolioDelegate.Widget
|
&& folio.HomeScreenState.dragState.dropDelegate.type === Folio.FolioDelegate.Widget
|
||||||
&& folio.HomeScreenState.dragState.dropDelegate.widget.visualApplet
|
&& folio.HomeScreenState.dragState.dropDelegate.widget.visualApplet
|
||||||
readonly property bool dropAnimationRunning: dragXAnim.running || dragYAnim.running
|
readonly property bool dropAnimationRunning: dragXAnim.running || dragYAnim.running
|
||||||
readonly property int dropAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
x: Math.round(folio.HomeScreenState.delegateDragX)
|
x: Math.round(folio.HomeScreenState.delegateDragX)
|
||||||
|
|
@ -54,8 +52,8 @@ Item {
|
||||||
XAnimator on x {
|
XAnimator on x {
|
||||||
id: dragXAnim
|
id: dragXAnim
|
||||||
running: false
|
running: false
|
||||||
duration: root.dropAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
root.widget = null;
|
root.widget = null;
|
||||||
|
|
@ -67,8 +65,8 @@ Item {
|
||||||
YAnimator on y {
|
YAnimator on y {
|
||||||
id: dragYAnim
|
id: dragYAnim
|
||||||
running: false
|
running: false
|
||||||
duration: root.dropAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.visible = false;
|
root.visible = false;
|
||||||
root.widget = null;
|
root.widget = null;
|
||||||
|
|
|
||||||
|
|
@ -32,19 +32,16 @@ Folio.DelegateTouchArea {
|
||||||
// grow/shrink animation
|
// grow/shrink animation
|
||||||
property real scaleAmount: 1
|
property real scaleAmount: 1
|
||||||
property bool clickRequested: false
|
property bool clickRequested: false
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleIn
|
|
||||||
|
|
||||||
function keyboardFocus() {
|
function keyboardFocus() {
|
||||||
delegateWrapper.forceActiveFocus();
|
delegateWrapper.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on scaleAmount {
|
NumberAnimation on scaleAmount {
|
||||||
id: shrinkAnim
|
id: shrinkAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: root.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: root.pressedScale
|
to: ShellSettings.Settings.animationsEnabled ? 0.8 : 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (!root.pressed) {
|
if (!root.pressed) {
|
||||||
growAnim.restart();
|
growAnim.restart();
|
||||||
|
|
@ -52,11 +49,10 @@ Folio.DelegateTouchArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on scaleAmount {
|
NumberAnimation on scaleAmount {
|
||||||
id: growAnim
|
id: growAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: root.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: 1
|
to: 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (root.clickRequested) {
|
if (root.clickRequested) {
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ AbstractDelegate {
|
||||||
|
|
||||||
property bool turnToFolder: false
|
property bool turnToFolder: false
|
||||||
property bool turnToFolderAnimEnabled: false
|
property bool turnToFolderAnimEnabled: false
|
||||||
readonly property int turnToFolderAnimationDuration: root.turnToFolderAnimEnabled ? MobileShell.Motion.duration(MobileShell.Motion.Standard) : 0
|
|
||||||
readonly property color folderFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
function launchApp() {
|
function launchApp() {
|
||||||
if (!application) {
|
if (!application) {
|
||||||
|
|
@ -61,7 +59,7 @@ AbstractDelegate {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rect
|
id: rect
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: root.folderFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
@ -71,15 +69,15 @@ AbstractDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: root.turnToFolder ? 1 : 0
|
opacity: root.turnToFolder ? 1 : 0
|
||||||
property real scaleAmount: root.turnToFolder ? 1.08 : 1.0
|
property real scaleAmount: root.turnToFolder ? 1.2 : 1.0
|
||||||
|
|
||||||
Behavior on scaleAmount {
|
Behavior on scaleAmount {
|
||||||
enabled: root.turnToFolderAnimEnabled
|
enabled: root.turnToFolderAnimEnabled
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Standard; duration: root.turnToFolderAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
enabled: root.turnToFolderAnimEnabled
|
enabled: root.turnToFolderAnimEnabled
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Standard; duration: root.turnToFolderAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
@ -97,10 +95,10 @@ AbstractDelegate {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: root.application ? root.application.icon : ""
|
source: root.application ? root.application.icon : ""
|
||||||
|
|
||||||
property real scaleAmount: root.turnToFolder ? 0.42 : 1.0
|
property real scaleAmount: root.turnToFolder ? 0.3 : 1.0
|
||||||
Behavior on scaleAmount {
|
Behavior on scaleAmount {
|
||||||
enabled: root.turnToFolderAnimEnabled
|
enabled: root.turnToFolderAnimEnabled
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Standard; duration: root.turnToFolderAnimationDuration }
|
NumberAnimation { duration: root.turnToFolderAnimEnabled ? Kirigami.Units.longDuration : 0; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@ Item {
|
||||||
property Folio.FolioApplicationFolder folder
|
property Folio.FolioApplicationFolder folder
|
||||||
|
|
||||||
property bool expandBackground: false
|
property bool expandBackground: false
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
|
||||||
readonly property color folderFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
height: folio.FolioSettings.delegateIconSize
|
height: folio.FolioSettings.delegateIconSize
|
||||||
width: folio.FolioSettings.delegateIconSize
|
width: folio.FolioSettings.delegateIconSize
|
||||||
|
|
@ -28,7 +26,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rect
|
id: rect
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
color: root.folderFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
@ -37,9 +35,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property real scaleAmount: root.expandBackground ? 1.08 : 1.0
|
property real scaleAmount: root.expandBackground ? 1.2 : 1.0
|
||||||
|
|
||||||
Behavior on scaleAmount { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Standard; duration: root.longAnimationDuration } }
|
Behavior on scaleAmount { NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad } }
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
origin.x: root.width / 2
|
origin.x: root.width / 2
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ Folio.WidgetContainer {
|
||||||
readonly property real bottomWidgetBackgroundPadding: widgetBackground.margins.bottom
|
readonly property real bottomWidgetBackgroundPadding: widgetBackground.margins.bottom
|
||||||
readonly property real leftWidgetBackgroundPadding: widgetBackground.margins.left
|
readonly property real leftWidgetBackgroundPadding: widgetBackground.margins.left
|
||||||
readonly property real rightWidgetBackgroundPadding: widgetBackground.margins.right
|
readonly property real rightWidgetBackgroundPadding: widgetBackground.margins.right
|
||||||
readonly property color placeholderColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.28)
|
|
||||||
|
|
||||||
implicitWidth: (widget ? widget.gridWidth : 0) * folio.HomeScreenState.pageCellWidth
|
implicitWidth: (widget ? widget.gridWidth : 0) * folio.HomeScreenState.pageCellWidth
|
||||||
implicitHeight: (widget ? widget.gridHeight : 0) * folio.HomeScreenState.pageCellHeight
|
implicitHeight: (widget ? widget.gridHeight : 0) * folio.HomeScreenState.pageCellHeight
|
||||||
|
|
@ -95,7 +94,7 @@ Folio.WidgetContainer {
|
||||||
id: temporaryBackground
|
id: temporaryBackground
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
visible: root.widget && !root.widget.applet
|
visible: root.widget && !root.widget.applet
|
||||||
color: root.placeholderColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.ksvg 1.0 as KSvg
|
import org.kde.ksvg 1.0 as KSvg
|
||||||
|
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
|
|
@ -42,7 +41,6 @@ Item {
|
||||||
|
|
||||||
signal removeRequested()
|
signal removeRequested()
|
||||||
signal closed()
|
signal closed()
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
function startOpen() {
|
function startOpen() {
|
||||||
// prevent config overlay if lock layout is enabled
|
// prevent config overlay if lock layout is enabled
|
||||||
|
|
@ -71,7 +69,7 @@ Item {
|
||||||
// in case this gets stuck open over the homescreen, just close on tap
|
// in case this gets stuck open over the homescreen, just close on tap
|
||||||
onClicked: close()
|
onClicked: close()
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity { id: configOverlayOpacityAnim; type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
NumberAnimation on opacity { id: configOverlayOpacityAnim; duration: Kirigami.Units.longDuration }
|
||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
configOverlayOpacityAnim.to = 1;
|
configOverlayOpacityAnim.to = 1;
|
||||||
|
|
@ -135,7 +133,7 @@ Item {
|
||||||
QQC2.Overlay.modal: Item {}
|
QQC2.Overlay.modal: Item {}
|
||||||
|
|
||||||
exit: Transition {
|
exit: Transition {
|
||||||
MobileShell.MotionNumberAnimation { property: "opacity"; type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration; from: 1.0; to: 0.0 }
|
NumberAnimation { property: "opacity"; duration: Kirigami.Units.longDuration; from: 1.0; to: 0.0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,6 @@ Window {
|
||||||
readonly property string rightShoulderLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonRightShoulder)
|
readonly property string rightShoulderLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonRightShoulder)
|
||||||
readonly property string quickSettingsButtonLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonBack)
|
readonly property string quickSettingsButtonLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonBack)
|
||||||
readonly property string searchButtonLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonStart)
|
readonly property string searchButtonLabel: GamingShell.GamepadManager.buttonLabel(GamingShell.GamepadManager.ButtonStart)
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property int launchFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.StandardAccel)
|
|
||||||
|
|
||||||
function pulsePrimaryGamepad(lowIntensity, highIntensity, durationMs) {
|
function pulsePrimaryGamepad(lowIntensity, highIntensity, durationMs) {
|
||||||
var pad = GamingShell.GamepadManager.primaryGamepad
|
var pad = GamingShell.GamepadManager.primaryGamepad
|
||||||
|
|
@ -164,7 +161,7 @@ Window {
|
||||||
// Animate opacity on show/hide
|
// Animate opacity on show/hide
|
||||||
opacity: visible ? 1 : 0
|
opacity: visible ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
@ -963,7 +960,7 @@ Window {
|
||||||
|
|
||||||
scale: parent.parent.parent.isCurrent ? 1.08 : 1.0
|
scale: parent.parent.parent.isCurrent ? 1.08 : 1.0
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1119,7 +1116,7 @@ Window {
|
||||||
z: 100
|
z: 100
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.StandardAccel; duration: root.launchFadeDuration }
|
NumberAnimation { duration: 250; easing.type: Easing.InQuad }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import QtQuick.Layouts
|
||||||
import QtQuick.Window
|
import QtQuick.Window
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.private.mobileshell.gamingshellplugin as GamingShell
|
import org.kde.plasma.private.mobileshell.gamingshellplugin as GamingShell
|
||||||
import org.kde.layershell 1.0 as LayerShell
|
import org.kde.layershell 1.0 as LayerShell
|
||||||
|
|
||||||
|
|
@ -23,8 +23,6 @@ Window {
|
||||||
property string toastMessage: ""
|
property string toastMessage: ""
|
||||||
property bool toastError: false
|
property bool toastError: false
|
||||||
readonly property bool toastActive: toastMessage.length > 0
|
readonly property bool toastActive: toastMessage.length > 0
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
// Most-recently-played game for quick resume. Populated from recentGames(1)
|
// Most-recently-played game for quick resume. Populated from recentGames(1)
|
||||||
// and refreshed whenever the recent list changes.
|
// and refreshed whenever the recent list changes.
|
||||||
|
|
@ -41,10 +39,10 @@ Window {
|
||||||
flags: Qt.FramelessWindowHint
|
flags: Qt.FramelessWindowHint
|
||||||
|
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
|
|
||||||
LayerShell.Window.scope: "gaming-hud"
|
LayerShell.Window.scope: "gaming-hud"
|
||||||
|
|
@ -59,7 +57,7 @@ Window {
|
||||||
|
|
||||||
opacity: showing ? 1 : 0
|
opacity: showing ? 1 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|
@ -185,7 +183,7 @@ Window {
|
||||||
|
|
||||||
opacity: root.toastActive ? 1.0 : 0.0
|
opacity: root.toastActive ? 1.0 : 0.0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ Item {
|
||||||
color: "black"
|
color: "black"
|
||||||
opacity: root.opened ? 0.4 : 0
|
opacity: root.opened ? 0.4 : 0
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsDefault }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,7 +150,7 @@ Item {
|
||||||
x: root.opened ? root.width - width : root.width
|
x: root.opened ? root.width - width : root.width
|
||||||
|
|
||||||
Behavior on x {
|
Behavior on x {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import QtQuick.Controls as QQC2
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.components 3.0 as PC3
|
import org.kde.plasma.components 3.0 as PC3
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.taskmanager as TaskManager
|
import org.kde.taskmanager as TaskManager
|
||||||
|
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
||||||
|
|
@ -18,8 +17,6 @@ Item {
|
||||||
implicitHeight: taskList.count > 0 ? column.implicitHeight : 0
|
implicitHeight: taskList.count > 0 ? column.implicitHeight : 0
|
||||||
readonly property bool hasTasks: taskList.count > 0
|
readonly property bool hasTasks: taskList.count > 0
|
||||||
readonly property int taskCount: taskList.count
|
readonly property int taskCount: taskList.count
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Standard)
|
|
||||||
|
|
||||||
signal taskActivated()
|
signal taskActivated()
|
||||||
signal moveDownRequested()
|
signal moveDownRequested()
|
||||||
|
|
@ -62,7 +59,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Standard; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -155,7 +152,7 @@ Item {
|
||||||
: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g,
|
: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g,
|
||||||
Kirigami.Theme.textColor.b, 0.06)
|
Kirigami.Theme.textColor.b, 0.06)
|
||||||
|
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on color { ColorAnimation { duration: Kirigami.Units.shortDuration } }
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ import "./private"
|
||||||
ContainmentItem {
|
ContainmentItem {
|
||||||
id: root
|
id: root
|
||||||
property var folio: root.plasmoid
|
property var folio: root.plasmoid
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
// Tracks whether the Game Center grid is visible within gaming mode.
|
// Tracks whether the Game Center grid is visible within gaming mode.
|
||||||
// If gaming mode is already enabled at startup, open it immediately so
|
// If gaming mode is already enabled at startup, open it immediately so
|
||||||
|
|
@ -296,8 +295,6 @@ ContainmentItem {
|
||||||
// maximized. The reveal strip at the screen edge brings it back.
|
// maximized. The reveal strip at the screen edge brings it back.
|
||||||
property real dockOffset: 0
|
property real dockOffset: 0
|
||||||
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
|
readonly property real dockHeight: MobileShell.Constants.convergenceDockHeight
|
||||||
readonly property int dockAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int dockFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
// Height of the input-receive strip kept at the screen edge when
|
// Height of the input-receive strip kept at the screen edge when
|
||||||
// the dock is hidden. Matches the navigation panel convention.
|
// the dock is hidden. Matches the navigation panel convention.
|
||||||
|
|
@ -368,14 +365,14 @@ ContainmentItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on dockOffset {
|
Behavior on dockOffset {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.SpatialDefault
|
easing.type: Easing.InOutCubic
|
||||||
duration: dockOverlay.dockAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: dockOverlay.dockFadeDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -850,7 +847,7 @@ ContainmentItem {
|
||||||
border.color: Qt.rgba(1, 1, 1, 0.2)
|
border.color: Qt.rgba(1, 1, 1, 0.2)
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
|
|
||||||
implicitWidth: hintText.implicitWidth + Kirigami.Units.gridUnit * 2
|
implicitWidth: hintText.implicitWidth + Kirigami.Units.gridUnit * 2
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
import '../delegate'
|
import '../delegate'
|
||||||
|
|
||||||
|
|
@ -14,8 +13,6 @@ MouseArea {
|
||||||
width: 10 + touchPadding * 2
|
width: 10 + touchPadding * 2
|
||||||
|
|
||||||
readonly property real touchPadding: 20
|
readonly property real touchPadding: 20
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow)
|
|
||||||
readonly property color resizeHandleColor: Kirigami.Theme.highlightColor
|
|
||||||
|
|
||||||
property int orientation
|
property int orientation
|
||||||
|
|
||||||
|
|
@ -82,14 +79,14 @@ MouseArea {
|
||||||
id: rect
|
id: rect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: root.touchPadding
|
anchors.margins: root.touchPadding
|
||||||
color: root.resizeHandleColor
|
color: 'white'
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
property real scaleFactor: root.pressed ? MobileShell.Motion.pressScaleOut : 1.0
|
property real scaleFactor: root.pressed ? 1.2 : 1.0
|
||||||
|
|
||||||
Behavior on scaleFactor {
|
Behavior on scaleFactor {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsSlow; duration: root.pressAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.veryLongDuration; easing.type: Easing.OutExpo }
|
||||||
}
|
}
|
||||||
|
|
||||||
xScale: scaleFactor
|
xScale: scaleFactor
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import QtQuick.Controls as QQC2
|
||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
import plasma.applet.org.kde.plasma.mobile.homescreen.folio as Folio
|
||||||
|
|
||||||
import '../delegate'
|
import '../delegate'
|
||||||
|
|
@ -42,8 +41,6 @@ Item {
|
||||||
property int widgetGridHeightAfterDrag: 0
|
property int widgetGridHeightAfterDrag: 0
|
||||||
|
|
||||||
property var lockDrag: null
|
property var lockDrag: null
|
||||||
readonly property int resizeAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property color resizeAccentColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.85)
|
|
||||||
|
|
||||||
property alias handleContainer: handleContainer
|
property alias handleContainer: handleContainer
|
||||||
|
|
||||||
|
|
@ -145,35 +142,35 @@ Item {
|
||||||
Item {
|
Item {
|
||||||
id: handleContainer
|
id: handleContainer
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on width {
|
NumberAnimation on width {
|
||||||
id: widthAnim
|
id: widthAnim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.resizeAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on height {
|
NumberAnimation on height {
|
||||||
id: heightAnim
|
id: heightAnim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.resizeAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on x {
|
NumberAnimation on x {
|
||||||
id: xAnim
|
id: xAnim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.resizeAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on y {
|
NumberAnimation on y {
|
||||||
id: yAnim
|
id: yAnim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.resizeAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: resizeOutline
|
id: resizeOutline
|
||||||
color: 'transparent'
|
color: 'transparent'
|
||||||
border.color: root.resizeAccentColor
|
border.color: 'white'
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,8 @@ Item {
|
||||||
property Folio.HomeScreen folio
|
property Folio.HomeScreen folio
|
||||||
|
|
||||||
readonly property string pluginName: model.pluginName
|
readonly property string pluginName: model.pluginName
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleIn
|
|
||||||
readonly property color hoverColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.22)
|
|
||||||
|
|
||||||
property real zoomScale: (model.isSupported && mouseArea.pressed) ? pressedScale : 1
|
property real zoomScale: (model.isSupported && mouseArea.pressed) ? 0.8 : 1
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
origin.x: delegate.width / 2;
|
origin.x: delegate.width / 2;
|
||||||
origin.y: delegate.height / 2;
|
origin.y: delegate.height / 2;
|
||||||
|
|
@ -30,7 +27,7 @@ Item {
|
||||||
yScale: delegate.zoomScale
|
yScale: delegate.zoomScale
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on zoomScale { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Press; duration: delegate.pressAnimationDuration } }
|
Behavior on zoomScale { NumberAnimation { duration: 80 } }
|
||||||
|
|
||||||
// Placeholder item used for implement drag & drop
|
// Placeholder item used for implement drag & drop
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -75,7 +72,7 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: background
|
id: background
|
||||||
color: root.hoverColor
|
color: Qt.rgba(255, 255, 255, 0.3)
|
||||||
visible: model.isSupported && mouseArea.containsMouse
|
visible: model.isSupported && mouseArea.containsMouse
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import org.kde.kquickcontrolsaddons 2.0
|
||||||
|
|
||||||
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutManager
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
import org.kde.plasma.private.mobileshell.state as MobileShellState
|
||||||
import org.kde.plasma.plasmoid
|
import org.kde.plasma.plasmoid
|
||||||
|
|
||||||
|
|
@ -38,9 +39,6 @@ Item {
|
||||||
readonly property string applicationName: application ? application.name : ""
|
readonly property string applicationName: application ? application.name : ""
|
||||||
readonly property string applicationStorageId: application ? application.storageId : ""
|
readonly property string applicationStorageId: application ? application.storageId : ""
|
||||||
readonly property string applicationIcon: application ? application.icon : ""
|
readonly property string applicationIcon: application ? application.icon : ""
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property color pressFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.18)
|
|
||||||
readonly property color folderFeedbackColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.24)
|
|
||||||
|
|
||||||
signal folderOpenRequested()
|
signal folderOpenRequested()
|
||||||
|
|
||||||
|
|
@ -144,12 +142,11 @@ Item {
|
||||||
|
|
||||||
property bool launchAppRequested: false
|
property bool launchAppRequested: false
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on zoomScale {
|
NumberAnimation on zoomScale {
|
||||||
id: shrinkAnim
|
id: shrinkAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: delegate.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: MobileShell.Motion.pressScaleIn
|
to: ShellSettings.Settings.animationsEnabled ? 0.95 : 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (!mouseArea.pressed) {
|
if (!mouseArea.pressed) {
|
||||||
growAnim.restart();
|
growAnim.restart();
|
||||||
|
|
@ -157,11 +154,10 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on zoomScale {
|
NumberAnimation on zoomScale {
|
||||||
id: growAnim
|
id: growAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: delegate.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: 1
|
to: 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (mouseArea.launchAppRequested) {
|
if (mouseArea.launchAppRequested) {
|
||||||
|
|
@ -192,7 +188,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: height / 2
|
radius: height / 2
|
||||||
color: mouseArea.pressed ? delegate.pressFeedbackColor : "transparent"
|
color: mouseArea.pressed ? Qt.rgba(255, 255, 255, 0.2) : "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
|
@ -267,7 +263,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Kirigami.Units.smallSpacing
|
anchors.margins: Kirigami.Units.smallSpacing
|
||||||
color: delegate.folderFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.2)
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
opacity: delegate.dragFolderAnimationProgress
|
opacity: delegate.dragFolderAnimationProgress
|
||||||
|
|
||||||
|
|
@ -321,7 +317,7 @@ Item {
|
||||||
id: rect
|
id: rect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Kirigami.Units.smallSpacing
|
anchors.margins: Kirigami.Units.smallSpacing
|
||||||
color: delegate.folderFeedbackColor
|
color: Qt.rgba(255, 255, 255, 0.2)
|
||||||
radius: Kirigami.Units.cornerRadius
|
radius: Kirigami.Units.cornerRadius
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ MobileShell.GridView {
|
||||||
id: root
|
id: root
|
||||||
property MobileShell.MaskManager maskManager
|
property MobileShell.MaskManager maskManager
|
||||||
required property var searchWidget
|
required property var searchWidget
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialFast)
|
|
||||||
|
|
||||||
// don't set anchors.margins since we want everywhere to be draggable
|
// don't set anchors.margins since we want everywhere to be draggable
|
||||||
required property bool twoColumn
|
required property bool twoColumn
|
||||||
|
|
@ -199,12 +198,11 @@ MobileShell.GridView {
|
||||||
folderAnim.restart();
|
folderAnim.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: folderAnim
|
id: folderAnim
|
||||||
target: appDelegate
|
target: appDelegate
|
||||||
properties: "dragFolderAnimationProgress"
|
properties: "dragFolderAnimationProgress"
|
||||||
type: MobileShell.Motion.SpatialFast
|
duration: Kirigami.Units.shortDuration
|
||||||
duration: root.shortAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -255,11 +253,10 @@ MobileShell.GridView {
|
||||||
|
|
||||||
// animations
|
// animations
|
||||||
displaced: Transition {
|
displaced: Transition {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: transitionAnim
|
id: transitionAnim
|
||||||
properties: "x,y"
|
properties: "x,y"
|
||||||
type: MobileShell.Motion.SpatialFast
|
easing.type: Easing.OutQuad
|
||||||
duration: root.shortAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import org.kde.draganddrop 2.0 as DragDrop
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -25,7 +26,6 @@ Item {
|
||||||
|
|
||||||
readonly property real cellWidth: twoColumn ? (root.width - leftMargin - rightMargin) / 2 : (root.width - leftMargin - rightMargin)
|
readonly property real cellWidth: twoColumn ? (root.width - leftMargin - rightMargin) / 2 : (root.width - leftMargin - rightMargin)
|
||||||
readonly property real cellHeight: delegateHeight
|
readonly property real cellHeight: delegateHeight
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
|
|
||||||
readonly property real leftMargin: Math.round(width * 0.1)
|
readonly property real leftMargin: Math.round(width * 0.1)
|
||||||
readonly property real rightMargin: Math.round(width * 0.1)
|
readonly property real rightMargin: Math.round(width * 0.1)
|
||||||
|
|
@ -150,35 +150,35 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: goToBeginningAnim
|
id: goToBeginningAnim
|
||||||
target: favoritesGrid
|
target: favoritesGrid
|
||||||
properties: 'contentY'
|
properties: 'contentY'
|
||||||
to: favoritesGrid.originY
|
to: favoritesGrid.originY
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.longAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: openFolderAnim
|
id: openFolderAnim
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
target: favoritesGrid
|
target: favoritesGrid
|
||||||
properties: 'openFolderProgress'
|
properties: 'openFolderProgress'
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
||||||
duration: root.longAnimationDuration
|
|
||||||
to: 1
|
to: 1
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
target: folderGrid
|
target: folderGrid
|
||||||
properties: 'openProgress'
|
properties: 'openProgress'
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
||||||
duration: root.longAnimationDuration
|
|
||||||
to: 1
|
to: 1
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -187,22 +187,22 @@ Item {
|
||||||
id: closeFolderAnim
|
id: closeFolderAnim
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
target: folderGrid
|
target: folderGrid
|
||||||
properties: 'openProgress'
|
properties: 'openProgress'
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
||||||
duration: root.longAnimationDuration
|
|
||||||
to: 0
|
to: 0
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
target: favoritesGrid
|
target: favoritesGrid
|
||||||
properties: 'openFolderProgress'
|
properties: 'openFolderProgress'
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
||||||
duration: root.longAnimationDuration
|
|
||||||
to: 0
|
to: 0
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon
|
||||||
MobileShell.GridView {
|
MobileShell.GridView {
|
||||||
id: root
|
id: root
|
||||||
property Halcyon.ApplicationFolder folder: null
|
property Halcyon.ApplicationFolder folder: null
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialFast)
|
|
||||||
|
|
||||||
property string folderName: folder ? folder.name : ""
|
property string folderName: folder ? folder.name : ""
|
||||||
property var folderModel: folder ? folder.applications : []
|
property var folderModel: folder ? folder.applications : []
|
||||||
|
|
@ -224,10 +223,9 @@ MobileShell.GridView {
|
||||||
|
|
||||||
// animations
|
// animations
|
||||||
displaced: Transition {
|
displaced: Transition {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
properties: "x,y"
|
properties: "x,y"
|
||||||
type: MobileShell.Motion.SpatialFast
|
easing.type: Easing.OutQuad
|
||||||
duration: root.shortAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import org.kde.kquickcontrolsaddons
|
||||||
import org.kde.plasma.plasmoid
|
import org.kde.plasma.plasmoid
|
||||||
|
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon
|
import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
@ -30,8 +31,6 @@ MouseArea {
|
||||||
property alias iconItem: icon
|
property alias iconItem: icon
|
||||||
|
|
||||||
readonly property real margins: Math.floor(width * 0.2)
|
readonly property real margins: Math.floor(width * 0.2)
|
||||||
readonly property int pressAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
readonly property real pressedScale: MobileShell.Motion.pressScaleIn
|
|
||||||
|
|
||||||
signal launch(int x, int y, var source, string title, string storageId)
|
signal launch(int x, int y, var source, string title, string storageId)
|
||||||
|
|
||||||
|
|
@ -83,12 +82,11 @@ MouseArea {
|
||||||
|
|
||||||
property bool launchAppRequested: false
|
property bool launchAppRequested: false
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on zoomScale {
|
NumberAnimation on zoomScale {
|
||||||
id: shrinkAnim
|
id: shrinkAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: delegate.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: delegate.pressedScale
|
to: ShellSettings.Settings.animationsEnabled ? 0.8 : 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (!delegate.pressed) {
|
if (!delegate.pressed) {
|
||||||
growAnim.restart();
|
growAnim.restart();
|
||||||
|
|
@ -96,11 +94,10 @@ MouseArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on zoomScale {
|
NumberAnimation on zoomScale {
|
||||||
id: growAnim
|
id: growAnim
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
running: false
|
running: false
|
||||||
duration: delegate.pressAnimationDuration
|
duration: ShellSettings.Settings.animationsEnabled ? 80 : 1
|
||||||
to: 1
|
to: 1
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (delegate.launchAppRequested) {
|
if (delegate.launchAppRequested) {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ MobileShell.GridView {
|
||||||
|
|
||||||
readonly property int reservedSpaceForLabel: metrics.height
|
readonly property int reservedSpaceForLabel: metrics.height
|
||||||
readonly property real effectiveContentWidth: width - leftMargin - rightMargin
|
readonly property real effectiveContentWidth: width - leftMargin - rightMargin
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
|
|
||||||
cellWidth: gridView.effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Kirigami.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8)
|
cellWidth: gridView.effectiveContentWidth / Math.min(Math.floor(effectiveContentWidth / (Kirigami.Units.iconSizes.huge + Kirigami.Units.largeSpacing * 2)), 8)
|
||||||
cellHeight: cellWidth + reservedSpaceForLabel
|
cellHeight: cellWidth + reservedSpaceForLabel
|
||||||
|
|
@ -47,11 +46,11 @@ MobileShell.GridView {
|
||||||
goToBeginningAnim.restart();
|
goToBeginningAnim.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on contentY {
|
NumberAnimation on contentY {
|
||||||
id: goToBeginningAnim
|
id: goToBeginningAnim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
|
||||||
to: gridView.originY
|
to: gridView.originY
|
||||||
duration: gridView.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
model: Halcyon.ApplicationListModel
|
model: Halcyon.ApplicationListModel
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import "settings" as Settings
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
property MobileShell.MaskManager maskManager
|
property MobileShell.MaskManager maskManager
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
required property real topMargin
|
required property real topMargin
|
||||||
required property real bottomMargin
|
required property real bottomMargin
|
||||||
|
|
@ -38,7 +37,7 @@ Item {
|
||||||
signal wallpaperSelectorTriggered()
|
signal wallpaperSelectorTriggered()
|
||||||
|
|
||||||
Behavior on settingsOpenFactor {
|
Behavior on settingsOpenFactor {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
function triggerHomescreen() {
|
function triggerHomescreen() {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ Item {
|
||||||
property real bottomPadding: 0
|
property real bottomPadding: 0
|
||||||
property real leftPadding: 0
|
property real leftPadding: 0
|
||||||
property real rightPadding: 0
|
property real rightPadding: 0
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
|
|
||||||
// Call when the gesture has started
|
// Call when the gesture has started
|
||||||
function startGesture() {
|
function startGesture() {
|
||||||
|
|
@ -111,10 +110,10 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on contentY {
|
NumberAnimation on contentY {
|
||||||
id: anim
|
id: anim
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.longAnimationDuration
|
easing.type: Easing.OutQuad
|
||||||
running: false
|
running: false
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (anim.to === flickable.openedContentY) {
|
if (anim.to === flickable.openedContentY) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import plasma.applet.org.kde.plasma.mobile.homescreen.halcyon as Halcyon
|
||||||
|
|
||||||
ContainmentItem {
|
ContainmentItem {
|
||||||
id: root
|
id: root
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Plasmoid.settings.load();
|
Plasmoid.settings.load();
|
||||||
|
|
@ -89,7 +88,7 @@ ContainmentItem {
|
||||||
|
|
||||||
property real darkenBackgroundFactor: halcyonHomeScreen.page == 1 ? 1 : 0
|
property real darkenBackgroundFactor: halcyonHomeScreen.page == 1 ? 1 : 0
|
||||||
Behavior on darkenBackgroundFactor {
|
Behavior on darkenBackgroundFactor {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.longDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -104,7 +103,7 @@ ContainmentItem {
|
||||||
opacity: halcyonHomeScreen.settingsOpenFactor
|
opacity: halcyonHomeScreen.settingsOpenFactor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsDefault; duration: root.longAnimationDuration }
|
ColorAnimation { duration: Kirigami.Units.longDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,6 @@ Item {
|
||||||
// Request the panel itself to reapply settings (ex. for updating touch area).
|
// Request the panel itself to reapply settings (ex. for updating touch area).
|
||||||
signal updatePanelPropertiesRequested()
|
signal updatePanelPropertiesRequested()
|
||||||
|
|
||||||
readonly property int panelAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Header
|
Kirigami.Theme.colorSet: forcedComplementary ? Kirigami.Theme.Complementary : Kirigami.Theme.Header
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
||||||
|
|
@ -62,7 +60,6 @@ Item {
|
||||||
State {
|
State {
|
||||||
// Panel is forced to be visible and overlaid over content (will be automatically hidden after a duration).
|
// Panel is forced to be visible and overlaid over content (will be automatically hidden after a duration).
|
||||||
name: "visible"
|
name: "visible"
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: root; offset: 0
|
target: root; offset: 0
|
||||||
}
|
}
|
||||||
|
|
@ -79,10 +76,10 @@ Item {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "offset"
|
properties: "offset"
|
||||||
type: root.state === "hidden" ? MobileShell.Motion.EmphasizedAccel : MobileShell.Motion.SpatialDefault
|
easing.type: root.state === "hidden" ? Easing.InExpo : Easing.OutExpo
|
||||||
duration: root.panelAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,6 @@ ContainmentItem {
|
||||||
readonly property bool inLandscape: MobileShell.Constants.navigationPanelOnSide(Screen.width, Screen.height)
|
readonly property bool inLandscape: MobileShell.Constants.navigationPanelOnSide(Screen.width, Screen.height)
|
||||||
|
|
||||||
readonly property bool gamingMode: ShellSettings.Settings.gamingModeEnabled
|
readonly property bool gamingMode: ShellSettings.Settings.gamingModeEnabled
|
||||||
readonly property int navigationAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int resetAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault) * 1.5)
|
|
||||||
|
|
||||||
readonly property real navigationPanelHeight: gamingMode ? 0 : MobileShell.Constants.navigationPanelThickness
|
readonly property real navigationPanelHeight: gamingMode ? 0 : MobileShell.Constants.navigationPanelThickness
|
||||||
readonly property real convergenceWorkspaceFrameThickness: ShellSettings.Settings.convergenceModeEnabled && !gamingMode
|
readonly property real convergenceWorkspaceFrameThickness: ShellSettings.Settings.convergenceModeEnabled && !gamingMode
|
||||||
|
|
@ -328,10 +326,10 @@ ContainmentItem {
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
properties: "offset"
|
properties: "offset"
|
||||||
type: navigationPanel.state === "hidden" ? MobileShell.Motion.EmphasizedAccel : MobileShell.Motion.SpatialDefault
|
easing.type: navigationPanel.state === "hidden" ? Easing.InExpo : Easing.OutExpo
|
||||||
duration: root.navigationAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
@ -379,14 +377,14 @@ ContainmentItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
id: resetAn
|
id: resetAn
|
||||||
running: false
|
running: false
|
||||||
target: dragEffect
|
target: dragEffect
|
||||||
property: "offsetPoint"
|
property: "offsetPoint"
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration * 1.5
|
||||||
duration: root.resetAnimationDuration
|
easing.type: Easing.OutExpo
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
if (!running && navigationPanel.state == "hidden") {
|
if (!running && navigationPanel.state == "hidden") {
|
||||||
root.setWindowProperties();
|
root.setWindowProperties();
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,7 @@ QMap<QString, QMap<QString, QVariant>> getKwinrcSettings(KSharedConfig::Ptr m_mo
|
||||||
{"convergentwindowsEnabled", true}, // enable our convergent window plugin
|
{"convergentwindowsEnabled", true}, // enable our convergent window plugin
|
||||||
{"mobiletaskswitcherEnabled", !convergenceModeEnabled}, // mobile task switcher on phone only; convergence uses standard Alt-Tab tabbox
|
{"mobiletaskswitcherEnabled", !convergenceModeEnabled}, // mobile task switcher on phone only; convergence uses standard Alt-Tab tabbox
|
||||||
{"overviewEnabled", convergenceModeEnabled}, // enable KWin Overview effect in convergence mode for desktop-style task switching
|
{"overviewEnabled", convergenceModeEnabled}, // enable KWin Overview effect in convergence mode for desktop-style task switching
|
||||||
{"screenedgeEnabled", convergenceModeEnabled}, // enable screen edge visual feedback in convergence mode (mouse hot corners)
|
{"screenedgeEnabled", convergenceModeEnabled} // enable screen edge visual feedback in convergence mode (mouse hot corners)
|
||||||
{"shift-tilingEnabled", convergenceModeEnabled},
|
|
||||||
{"shift-tile-previewEnabled", convergenceModeEnabled}
|
|
||||||
}},
|
}},
|
||||||
{"Wayland",
|
{"Wayland",
|
||||||
{
|
{
|
||||||
|
|
@ -80,8 +78,8 @@ QMap<QString, QMap<QString, QVariant>> getKwinrcSettings(KSharedConfig::Ptr m_mo
|
||||||
|
|
||||||
// Have a separate list here because we need to trigger DBus calls to load/unload each effect/script.
|
// Have a separate list here because we need to trigger DBus calls to load/unload each effect/script.
|
||||||
// Make sure that the effect/script is added to the kwinrc "Plugins" section above!
|
// Make sure that the effect/script is added to the kwinrc "Plugins" section above!
|
||||||
const QList<QString> KWIN_EFFECTS = {"blur", "mobiletaskswitcher", "overview", "screenedge", "shift-tile-preview"};
|
const QList<QString> KWIN_EFFECTS = {"blur", "mobiletaskswitcher", "overview", "screenedge"};
|
||||||
const QList<QString> KWIN_SCRIPTS = {"convergentwindows", "shift-tiling"};
|
const QList<QString> KWIN_SCRIPTS = {"convergentwindows"};
|
||||||
|
|
||||||
// .config/plasma-mobile/ksmserver - immutable settings:
|
// .config/plasma-mobile/ksmserver - immutable settings:
|
||||||
const QMap<QString, QMap<QString, QVariant>> KSMSERVER_SETTINGS = {{"General", {{"loginMode", "emptySession"}}}};
|
const QMap<QString, QMap<QString, QVariant>> KSMSERVER_SETTINGS = {{"General", {{"loginMode", "emptySession"}}}};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
`org.shift.icons` is the icon theme selected by `lookandfeel/contents/defaults`.
|
`org.shift.icons` is the icon theme selected by `lookandfeel/contents/defaults`.
|
||||||
It inherits only `hicolor`, so shell-owned glyphs used by the Shift UI need to exist in this theme or in the local hicolor source icon set.
|
It inherits only `hicolor`, so shell-owned glyphs used by the Shift UI need to exist in this theme or in the local hicolor source icon set.
|
||||||
The SVG glyphs are adapted from Phosphor Icons and licensed through the scoped REUSE metadata in `.reuse/dep5`.
|
The SVG glyphs are adapted from Phosphor Icons and licensed through the scoped REUSE metadata in `.reuse/dep5`.
|
||||||
The theme sets `FollowsColorScheme=true`; symbolic SVGs use `.ColorScheme-Text` and `currentColor` so KDE applications recolor them for both dark and light color schemes.
|
|
||||||
|
|
||||||
Theme paths used here:
|
Theme paths used here:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
Name=SHIFT
|
Name=SHIFT
|
||||||
Comment=SHIFT icon theme
|
Comment=SHIFT icon theme
|
||||||
Inherits=hicolor
|
Inherits=hicolor
|
||||||
FollowsColorScheme=true
|
|
||||||
Example=folder
|
Example=folder
|
||||||
DisplayDepth=32
|
DisplayDepth=32
|
||||||
DesktopDefault=48
|
DesktopDefault=48
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
import org.kde.plasma.mobileinitialstart.initialstart
|
import org.kde.plasma.mobileinitialstart.initialstart
|
||||||
import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare
|
import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare
|
||||||
|
|
@ -15,13 +14,9 @@ import org.kde.plasma.mobileinitialstart.prepare 1.0 as Prepare
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property real scaleStart: 1.16
|
readonly property real scaleStart: 1.4
|
||||||
readonly property real scaleLanding: 1.08
|
readonly property real scaleLanding: 1.2
|
||||||
readonly property real scaleSteps: 1
|
readonly property real scaleSteps: 1
|
||||||
readonly property int initialContentFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow) * 2
|
|
||||||
readonly property int returnContentFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property int imageFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow)
|
|
||||||
readonly property int imageScaleDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialVerySlow)
|
|
||||||
|
|
||||||
signal requestNextPage()
|
signal requestNextPage()
|
||||||
|
|
||||||
|
|
@ -32,15 +27,14 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
property real contentOpacity: 0
|
property real contentOpacity: 0
|
||||||
MobileShell.MotionNumberAnimation on contentOpacity {
|
NumberAnimation on contentOpacity {
|
||||||
id: contentOpacityAnim
|
id: contentOpacityAnim
|
||||||
type: MobileShell.Motion.EffectsSlow
|
|
||||||
running: true
|
running: true
|
||||||
duration: root.initialContentFadeDuration
|
duration: 1000
|
||||||
to: 1
|
to: 1
|
||||||
|
|
||||||
// shorten animation after initial run
|
// shorten animation after initial run
|
||||||
onFinished: duration = root.returnContentFadeDuration
|
onFinished: duration = 200
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
|
@ -68,11 +62,11 @@ Item {
|
||||||
|
|
||||||
opacity: 0
|
opacity: 0
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
type: MobileShell.Motion.EffectsSlow
|
|
||||||
running: true
|
running: true
|
||||||
duration: root.imageFadeDuration
|
duration: 400
|
||||||
to: 1
|
to: 1
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
// zoom animation
|
// zoom animation
|
||||||
|
|
@ -80,9 +74,9 @@ Item {
|
||||||
Component.onCompleted: scale = scaleLanding
|
Component.onCompleted: scale = scaleLanding
|
||||||
|
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.SpatialVerySlow
|
duration: 2000
|
||||||
duration: root.imageScaleDuration
|
easing.type: Easing.OutExpo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -21,16 +20,7 @@ Item {
|
||||||
|
|
||||||
property bool showBackground: true
|
property bool showBackground: true
|
||||||
property int fingerSize: 20
|
property int fingerSize: 20
|
||||||
readonly property bool animationsEnabled: ShellSettings.Settings.animationsEnabled
|
property int _endTimeout: 2000
|
||||||
readonly property int longAnimationDuration: animationsEnabled ? Kirigami.Units.longDuration : 0
|
|
||||||
readonly property int switcherDragDuration: animationsEnabled ? Math.round(Kirigami.Units.veryLongDuration * 3.75) : 0
|
|
||||||
readonly property int switcherSlideDuration: animationsEnabled ? Math.round(Kirigami.Units.veryLongDuration * 1.25) : 0
|
|
||||||
readonly property int flickDragDuration: animationsEnabled ? Math.round(Kirigami.Units.veryLongDuration * 2.25) : 0
|
|
||||||
readonly property int scrubSettleDuration: animationsEnabled ? Math.round(Kirigami.Units.veryLongDuration * 1.75) : 0
|
|
||||||
readonly property int quickAnimationDuration: animationsEnabled ? Math.round(Kirigami.Units.longDuration * 1.2) : 0
|
|
||||||
readonly property int sequencePauseDuration: animationsEnabled ? Math.round(Kirigami.Units.veryLongDuration * 1.25) : 0
|
|
||||||
readonly property int scrubLeadInDelay: animationsEnabled ? Kirigami.Units.veryLongDuration : 0
|
|
||||||
readonly property int _endTimeout: animationsEnabled ? Kirigami.Units.veryLongDuration * 5 : 0
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: phone
|
id: phone
|
||||||
|
|
@ -223,7 +213,7 @@ Item {
|
||||||
root.touchOnAnim.start()
|
root.touchOnAnim.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
duration: root.switcherDragDuration
|
duration: 1500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -232,7 +222,7 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -246,7 +236,7 @@ Item {
|
||||||
touchPoint.yPosition = 2;
|
touchPoint.yPosition = 2;
|
||||||
root.touchOnAnim.start()
|
root.touchOnAnim.start()
|
||||||
}
|
}
|
||||||
duration: root.switcherSlideDuration
|
duration: 500
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -255,14 +245,14 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
delays: [
|
delays: [
|
||||||
root.sequencePauseDuration,
|
500,
|
||||||
root.sequencePauseDuration,
|
500,
|
||||||
-root.longAnimationDuration * 2,
|
-Kirigami.Units.longDuration * 2,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,7 +288,7 @@ Item {
|
||||||
|
|
||||||
to: 0.55
|
to: 0.55
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -307,7 +297,7 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -349,7 +339,7 @@ Item {
|
||||||
root.touchOnAnim.start()
|
root.touchOnAnim.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
duration: root.flickDragDuration
|
duration: 900
|
||||||
easing.type: Easing.InQuart
|
easing.type: Easing.InQuart
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -358,12 +348,12 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
delays: [
|
delays: [
|
||||||
-root.longAnimationDuration,
|
-Kirigami.Units.longDuration,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -400,7 +390,7 @@ Item {
|
||||||
|
|
||||||
to: 0.1
|
to: 0.1
|
||||||
|
|
||||||
duration: root.quickAnimationDuration
|
duration: 300
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -409,7 +399,7 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.quickAnimationDuration
|
duration: 300
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
@ -443,7 +433,7 @@ Item {
|
||||||
root.touchOnAnim.start()
|
root.touchOnAnim.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
duration: root.flickDragDuration
|
duration: 900
|
||||||
easing.type: Easing.InOutQuart
|
easing.type: Easing.InOutQuart
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -453,7 +443,7 @@ Item {
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
|
|
||||||
duration: root.switcherDragDuration
|
duration: 1500
|
||||||
easing.type: Easing.InOutQuart
|
easing.type: Easing.InOutQuart
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -462,7 +452,7 @@ Item {
|
||||||
|
|
||||||
to: 0.5
|
to: 0.5
|
||||||
|
|
||||||
duration: root.scrubSettleDuration
|
duration: 700
|
||||||
easing.type: Easing.InOutCubic
|
easing.type: Easing.InOutCubic
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -471,14 +461,14 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
delays: [
|
delays: [
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
root.sequencePauseDuration
|
500
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -515,7 +505,7 @@ Item {
|
||||||
to: 0.55
|
to: 0.55
|
||||||
|
|
||||||
|
|
||||||
duration: root.quickAnimationDuration
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -524,7 +514,7 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.quickAnimationDuration
|
duration: 300
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
|
@ -551,7 +541,7 @@ Item {
|
||||||
|
|
||||||
to: 1
|
to: 1
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation { // move leftmost window out of the way, otherwise it overlaps
|
NumberAnimation { // move leftmost window out of the way, otherwise it overlaps
|
||||||
|
|
@ -560,7 +550,7 @@ Item {
|
||||||
|
|
||||||
to: 1.8
|
to: 1.8
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
},
|
},
|
||||||
NumberAnimation { // move middle window (that's to be focused) a bit to the side to counteract moving of the first window
|
NumberAnimation { // move middle window (that's to be focused) a bit to the side to counteract moving of the first window
|
||||||
|
|
@ -569,7 +559,7 @@ Item {
|
||||||
|
|
||||||
to: 0.4
|
to: 0.4
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
},
|
},
|
||||||
NumberAnimation { // move first (rightmost) window to get a bit more space between it and the middle one during the animation
|
NumberAnimation { // move first (rightmost) window to get a bit more space between it and the middle one during the animation
|
||||||
|
|
@ -578,14 +568,14 @@ Item {
|
||||||
|
|
||||||
to: 1
|
to: 1
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.Linear
|
easing.type: Easing.Linear
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
delays: [
|
delays: [
|
||||||
root.scrubLeadInDelay,
|
400,
|
||||||
immediate,
|
immediate,
|
||||||
scrubAnimation.animations[0].duration - root.quickAnimationDuration - root.scrubLeadInDelay,
|
scrubAnimation.animations[0].duration - 300 - 400,
|
||||||
scrubAnimation.delays[1],
|
scrubAnimation.delays[1],
|
||||||
scrubAnimation.delays[2],
|
scrubAnimation.delays[2],
|
||||||
immediate,
|
immediate,
|
||||||
|
|
@ -665,7 +655,7 @@ Item {
|
||||||
|
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InQuad
|
easing.type: Easing.InQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -675,7 +665,7 @@ Item {
|
||||||
|
|
||||||
to: root.fingerSize
|
to: root.fingerSize
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.OutQuad
|
easing.type: Easing.OutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
KCM.SimpleKCM {
|
KCM.SimpleKCM {
|
||||||
id: root
|
id: root
|
||||||
readonly property int longAnimationDuration: ShellSettings.Settings.animationsEnabled ? Kirigami.Units.longDuration : 0
|
|
||||||
|
|
||||||
title: i18n("Navigation")
|
title: i18n("Navigation")
|
||||||
|
|
||||||
|
|
@ -141,7 +140,7 @@ KCM.SimpleKCM {
|
||||||
|
|
||||||
to: -tutorialSwitcherInput.activeTutorialIndex * (tutorialContainer.phoneWidth + tutorialLayout.spacing)
|
to: -tutorialSwitcherInput.activeTutorialIndex * (tutorialContainer.phoneWidth + tutorialLayout.spacing)
|
||||||
|
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: Easing.InOutQuad
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,7 @@
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
// SPDX-License-Identifier: EUPL-1.2
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Shapes
|
|
||||||
import org.kde.kwin.decoration
|
import org.kde.kwin.decoration
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
||||||
|
|
||||||
Decoration {
|
Decoration {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -21,19 +18,13 @@ Decoration {
|
||||||
readonly property int btnSize: 16
|
readonly property int btnSize: 16
|
||||||
readonly property int btnSpacing: 8
|
readonly property int btnSpacing: 8
|
||||||
readonly property int btnSideMargin: 12
|
readonly property int btnSideMargin: 12
|
||||||
readonly property int normalCornerRadius: 8
|
readonly property int cornerRadius: decoration.client.maximized ? 0 : 8
|
||||||
readonly property int cornerRadius: decoration.client.maximized ? 0 : normalCornerRadius
|
|
||||||
readonly property int frameThickness: decoration.client.maximized ? 0 : normalCornerRadius
|
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property bool windowMenuAllowed: !ShellSettings.Settings.convergenceModeEnabled
|
|
||||||
|| ShellSettings.Settings.gamingModeEnabled
|
|
||||||
|| !ShellSettings.Settings.dynamicTilingEnabled
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
borders.top = barHeight;
|
borders.top = barHeight;
|
||||||
borders.left = normalCornerRadius;
|
borders.left = 0;
|
||||||
borders.right = normalCornerRadius;
|
borders.right = 0;
|
||||||
borders.bottom = normalCornerRadius;
|
borders.bottom = 0;
|
||||||
|
|
||||||
// Keep titlebar controls available for maximized windows in desktop
|
// Keep titlebar controls available for maximized windows in desktop
|
||||||
// convergence mode. Mobile mode uses noBorder=true and bypasses this.
|
// convergence mode. Mobile mode uses noBorder=true and bypasses this.
|
||||||
|
|
@ -48,36 +39,6 @@ Decoration {
|
||||||
deco: decoration
|
deco: decoration
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property color frameColor: decoration.client.active ? root.activeBar : root.inactiveBar
|
|
||||||
|
|
||||||
Shape {
|
|
||||||
anchors.fill: parent
|
|
||||||
visible: !decoration.client.maximized
|
|
||||||
|
|
||||||
ShapePath {
|
|
||||||
fillColor: root.frameColor
|
|
||||||
fillRule: ShapePath.OddEvenFill
|
|
||||||
strokeWidth: 0
|
|
||||||
|
|
||||||
startX: root.cornerRadius
|
|
||||||
startY: 0
|
|
||||||
PathLine { x: root.width - root.cornerRadius; y: 0 }
|
|
||||||
PathArc { x: root.width; y: root.cornerRadius; radiusX: root.cornerRadius; radiusY: root.cornerRadius }
|
|
||||||
PathLine { x: root.width; y: root.height - root.cornerRadius }
|
|
||||||
PathArc { x: root.width - root.cornerRadius; y: root.height; radiusX: root.cornerRadius; radiusY: root.cornerRadius }
|
|
||||||
PathLine { x: root.cornerRadius; y: root.height }
|
|
||||||
PathArc { x: 0; y: root.height - root.cornerRadius; radiusX: root.cornerRadius; radiusY: root.cornerRadius }
|
|
||||||
PathLine { x: 0; y: root.cornerRadius }
|
|
||||||
PathArc { x: root.cornerRadius; y: 0; radiusX: root.cornerRadius; radiusY: root.cornerRadius }
|
|
||||||
|
|
||||||
PathMove { x: root.frameThickness; y: root.barHeight }
|
|
||||||
PathLine { x: root.width - root.frameThickness; y: root.barHeight }
|
|
||||||
PathLine { x: root.width - root.frameThickness; y: root.height - root.frameThickness }
|
|
||||||
PathLine { x: root.frameThickness; y: root.height - root.frameThickness }
|
|
||||||
PathLine { x: root.frameThickness; y: root.barHeight }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── Faint window outline ─────────────────────────────────────────────────
|
// ── Faint window outline ─────────────────────────────────────────────────
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -94,7 +55,7 @@ Decoration {
|
||||||
height: root.barHeight
|
height: root.barHeight
|
||||||
radius: root.cornerRadius
|
radius: root.cornerRadius
|
||||||
color: decoration.client.active ? root.activeBar : root.inactiveBar
|
color: decoration.client.active ? root.activeBar : root.inactiveBar
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on color { ColorAnimation { duration: 120 } }
|
||||||
|
|
||||||
// Square off bottom half — only top corners are rounded
|
// Square off bottom half — only top corners are rounded
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
@ -135,7 +96,7 @@ Decoration {
|
||||||
elide: Text.ElideMiddle
|
elide: Text.ElideMiddle
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on color { ColorAnimation { duration: 120 } }
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
@ -152,14 +113,6 @@ Decoration {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
z: 1
|
|
||||||
enabled: !root.windowMenuAllowed
|
|
||||||
acceptedButtons: Qt.RightButton
|
|
||||||
onPressed: (mouse) => { mouse.accepted = true }
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: decoration.installTitleItem(titleRow)
|
Component.onCompleted: decoration.installTitleItem(titleRow)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -174,10 +127,9 @@ Decoration {
|
||||||
case DecorationOptions.DecorationButtonClose:
|
case DecorationOptions.DecorationButtonClose:
|
||||||
case DecorationOptions.DecorationButtonMinimize:
|
case DecorationOptions.DecorationButtonMinimize:
|
||||||
case DecorationOptions.DecorationButtonMaximizeRestore:
|
case DecorationOptions.DecorationButtonMaximizeRestore:
|
||||||
return true;
|
|
||||||
case DecorationOptions.DecorationButtonMenu:
|
case DecorationOptions.DecorationButtonMenu:
|
||||||
case DecorationOptions.DecorationButtonApplicationMenu:
|
case DecorationOptions.DecorationButtonApplicationMenu:
|
||||||
return root.windowMenuAllowed;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -243,7 +195,7 @@ Decoration {
|
||||||
color: parent.pressed ? Qt.darker(parent.hoverColor, 1.3)
|
color: parent.pressed ? Qt.darker(parent.hoverColor, 1.3)
|
||||||
: parent.hovered ? parent.hoverColor
|
: parent.hovered ? parent.hoverColor
|
||||||
: parent.normalColor
|
: parent.normalColor
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on color { ColorAnimation { duration: 100 } }
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -252,7 +204,7 @@ Decoration {
|
||||||
font.pixelSize: Math.round(parent.width * 0.66)
|
font.pixelSize: Math.round(parent.width * 0.66)
|
||||||
font.weight: Font.Bold
|
font.weight: Font.Bold
|
||||||
opacity: 1.0
|
opacity: 1.0
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: 100 } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,3 @@ function(add_kwin_effect name source)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
add_kwin_effect(shift-snap-assist shift-snap-assist)
|
add_kwin_effect(shift-snap-assist shift-snap-assist)
|
||||||
add_kwin_effect(shift-tile-preview shift-tile-preview)
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import org.kde.kwin as KWinComponents
|
import org.kde.kwin as KWinComponents
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
KWinComponents.SceneEffect {
|
KWinComponents.SceneEffect {
|
||||||
|
|
@ -39,7 +38,6 @@ KWinComponents.SceneEffect {
|
||||||
readonly property int panelScreenMargin: 8
|
readonly property int panelScreenMargin: 8
|
||||||
readonly property int panelCursorGap: 12
|
readonly property int panelCursorGap: 12
|
||||||
readonly property int panelCursorRightBias: 34
|
readonly property int panelCursorRightBias: 34
|
||||||
readonly property int hoverAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
property var hoverWindowId: null
|
property var hoverWindowId: null
|
||||||
property int hoverTicks: 0
|
property int hoverTicks: 0
|
||||||
property string hoverWindowStateKey: ""
|
property string hoverWindowStateKey: ""
|
||||||
|
|
@ -651,7 +649,7 @@ KWinComponents.SceneEffect {
|
||||||
|
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
|
||||||
Behavior on color { MobileShell.MotionColorAnimation { type: MobileShell.Motion.Press; duration: effect.hoverAnimationDuration } }
|
Behavior on color { ColorAnimation { duration: 80 } }
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: previewFrame
|
id: previewFrame
|
||||||
|
|
|
||||||
|
|
@ -1,331 +0,0 @@
|
||||||
// SPDX-FileCopyrightText: 2026 Marco Allegretti
|
|
||||||
// SPDX-License-Identifier: EUPL-1.2
|
|
||||||
|
|
||||||
import QtQuick
|
|
||||||
import org.kde.kwin as KWinComponents
|
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
|
||||||
|
|
||||||
KWinComponents.SceneEffect {
|
|
||||||
id: effect
|
|
||||||
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
readonly property int outerGap: 8
|
|
||||||
readonly property int floatEscapeMargin: 32
|
|
||||||
readonly property int previewAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int previewFadeDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
property var dragConnectedWindows: ({})
|
|
||||||
property var draggingWindow: null
|
|
||||||
property rect dragSourceGeometry: Qt.rect(0, 0, 0, 0)
|
|
||||||
|
|
||||||
property bool animatePreview: false
|
|
||||||
property bool previewVisible: false
|
|
||||||
property string previewMode: ""
|
|
||||||
property string previewScreenName: ""
|
|
||||||
property rect previewGeometry: Qt.rect(0, 0, 0, 0)
|
|
||||||
|
|
||||||
function isActive() {
|
|
||||||
return ShellSettings.Settings.convergenceModeEnabled
|
|
||||||
&& !ShellSettings.Settings.gamingModeEnabled
|
|
||||||
&& ShellSettings.Settings.dynamicTilingEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
function windowKey(window) {
|
|
||||||
return window && window.internalId !== undefined ? String(window.internalId) : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function shouldIgnore(window) {
|
|
||||||
if (!window || window.deleted) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (!window.normalWindow || !window.maximizable || window.fullScreen) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return window.resourceClass === "xwaylandvideobridge";
|
|
||||||
}
|
|
||||||
|
|
||||||
function validRect(geometry) {
|
|
||||||
return geometry && geometry.width > 0 && geometry.height > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function rectContainsPoint(geometry, point) {
|
|
||||||
return validRect(geometry)
|
|
||||||
&& point.x >= geometry.x
|
|
||||||
&& point.x <= geometry.x + geometry.width
|
|
||||||
&& point.y >= geometry.y
|
|
||||||
&& point.y <= geometry.y + geometry.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
function workRect(window) {
|
|
||||||
if (!window || !window.output || window.desktops.length === 0) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return KWinComponents.Workspace.clientArea(
|
|
||||||
KWinComponents.Workspace.MaximizeArea,
|
|
||||||
window.output,
|
|
||||||
window.desktops[0]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function outsideWorkArea(window, cursor) {
|
|
||||||
const area = workRect(window);
|
|
||||||
if (!area) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const expandedArea = Qt.rect(
|
|
||||||
area.x - floatEscapeMargin,
|
|
||||||
area.y - floatEscapeMargin,
|
|
||||||
area.width + floatEscapeMargin * 2,
|
|
||||||
area.height + floatEscapeMargin * 2
|
|
||||||
);
|
|
||||||
return !rectContainsPoint(expandedArea, cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
function findTileAtCursor(cursor, ignoredWindow) {
|
|
||||||
const ignoredKey = windowKey(ignoredWindow);
|
|
||||||
const windows = KWinComponents.Workspace.windows;
|
|
||||||
let bestWindow = null;
|
|
||||||
let bestGeometry = Qt.rect(0, 0, 0, 0);
|
|
||||||
let bestArea = 0;
|
|
||||||
|
|
||||||
for (let index = 0; index < windows.length; index++) {
|
|
||||||
const candidate = windows[index];
|
|
||||||
if (shouldIgnore(candidate) || windowKey(candidate) === ignoredKey) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!ignoredWindow || !candidate.output || !ignoredWindow.output || candidate.output.name !== ignoredWindow.output.name) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const geometry = candidate.frameGeometry;
|
|
||||||
if (!rectContainsPoint(geometry, cursor)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const area = geometry.width * geometry.height;
|
|
||||||
if (!bestWindow || area < bestArea) {
|
|
||||||
bestWindow = candidate;
|
|
||||||
bestGeometry = geometry;
|
|
||||||
bestArea = area;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return bestWindow ? bestGeometry : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function insetPreviewGeometry(geometry) {
|
|
||||||
const inset = Math.max(2, Math.round(outerGap / 2));
|
|
||||||
return Qt.rect(
|
|
||||||
geometry.x + inset,
|
|
||||||
geometry.y + inset,
|
|
||||||
Math.max(1, geometry.width - inset * 2),
|
|
||||||
Math.max(1, geometry.height - inset * 2)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showPreview(mode, geometry, screenName) {
|
|
||||||
hidePreview();
|
|
||||||
}
|
|
||||||
|
|
||||||
function hidePreview() {
|
|
||||||
previewVisible = false;
|
|
||||||
draggingWindow = null;
|
|
||||||
dragSourceGeometry = Qt.rect(0, 0, 0, 0);
|
|
||||||
disableEffectTimer.restart();
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatePreview(window, dragGeometry) {
|
|
||||||
if (!isActive() || draggingWindow !== window || !window.output) {
|
|
||||||
hidePreview();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const cursor = KWinComponents.Workspace.cursorPos;
|
|
||||||
const targetGeometry = findTileAtCursor(cursor, window);
|
|
||||||
if (targetGeometry) {
|
|
||||||
showPreview("swap", targetGeometry, window.output.name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (outsideWorkArea(window, cursor)) {
|
|
||||||
showPreview("float", validRect(dragGeometry) ? dragGeometry : window.frameGeometry, window.output.name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
showPreview("restore", dragSourceGeometry, window.output.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
function connectDragHandlers(window) {
|
|
||||||
const key = windowKey(window);
|
|
||||||
if (!key || dragConnectedWindows[key]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dragConnectedWindows[key] = true;
|
|
||||||
window.interactiveMoveResizeStarted.connect(function() {
|
|
||||||
if (!isActive() || shouldIgnore(window)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
draggingWindow = window;
|
|
||||||
dragSourceGeometry = window.frameGeometry;
|
|
||||||
showPreview("restore", dragSourceGeometry, window.output ? window.output.name : "");
|
|
||||||
});
|
|
||||||
window.interactiveMoveResizeStepped.connect(function(geometry) {
|
|
||||||
updatePreview(window, geometry);
|
|
||||||
});
|
|
||||||
window.interactiveMoveResizeFinished.connect(function() {
|
|
||||||
if (draggingWindow === window) {
|
|
||||||
hidePreview();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function connectExistingWindows() {
|
|
||||||
const windows = KWinComponents.Workspace.windows;
|
|
||||||
for (let index = 0; index < windows.length; index++) {
|
|
||||||
connectDragHandlers(windows[index]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function previewFillColor(mode) {
|
|
||||||
if (mode === "float") {
|
|
||||||
return Qt.rgba(1.0, 0.62, 0.24, 0.18);
|
|
||||||
}
|
|
||||||
if (mode === "restore") {
|
|
||||||
return Qt.rgba(1.0, 1.0, 1.0, 0.10);
|
|
||||||
}
|
|
||||||
return Qt.rgba(0.18, 0.72, 0.66, 0.22);
|
|
||||||
}
|
|
||||||
|
|
||||||
function previewBorderColor(mode) {
|
|
||||||
if (mode === "float") {
|
|
||||||
return Qt.rgba(1.0, 0.72, 0.36, 0.72);
|
|
||||||
}
|
|
||||||
if (mode === "restore") {
|
|
||||||
return Qt.rgba(1.0, 1.0, 1.0, 0.36);
|
|
||||||
}
|
|
||||||
return Qt.rgba(0.64, 0.90, 0.86, 0.82);
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: enableAnimationTimer
|
|
||||||
interval: 1
|
|
||||||
repeat: false
|
|
||||||
onTriggered: effect.animatePreview = true
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: disableEffectTimer
|
|
||||||
interval: effect.previewFadeDuration
|
|
||||||
repeat: false
|
|
||||||
onTriggered: {
|
|
||||||
if (!effect.previewVisible) {
|
|
||||||
effect.visible = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: KWinComponents.Workspace
|
|
||||||
|
|
||||||
function onWindowAdded(window) {
|
|
||||||
effect.connectDragHandlers(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
function onWindowRemoved(window) {
|
|
||||||
const key = effect.windowKey(window);
|
|
||||||
if (key) {
|
|
||||||
delete effect.dragConnectedWindows[key];
|
|
||||||
}
|
|
||||||
if (effect.draggingWindow === window) {
|
|
||||||
effect.hidePreview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: ShellSettings.Settings
|
|
||||||
|
|
||||||
function onConvergenceModeEnabledChanged() {
|
|
||||||
if (!effect.isActive()) {
|
|
||||||
effect.hidePreview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onGamingModeEnabledChanged() {
|
|
||||||
if (!effect.isActive()) {
|
|
||||||
effect.hidePreview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onDynamicTilingEnabledChanged() {
|
|
||||||
if (!effect.isActive()) {
|
|
||||||
effect.hidePreview();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: Rectangle {
|
|
||||||
id: screenDelegate
|
|
||||||
|
|
||||||
readonly property var targetScreen: KWinComponents.SceneView.screen
|
|
||||||
readonly property bool previewOnScreen: effect.previewScreenName === targetScreen.name
|
|
||||||
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: previewSurface
|
|
||||||
|
|
||||||
visible: opacity > 0
|
|
||||||
x: effect.previewGeometry.x - screenDelegate.targetScreen.geometry.x
|
|
||||||
y: effect.previewGeometry.y - screenDelegate.targetScreen.geometry.y
|
|
||||||
width: effect.previewGeometry.width
|
|
||||||
height: effect.previewGeometry.height
|
|
||||||
radius: 14
|
|
||||||
opacity: effect.previewVisible && screenDelegate.previewOnScreen ? 1 : 0
|
|
||||||
color: effect.previewFillColor(effect.previewMode)
|
|
||||||
border.width: 2
|
|
||||||
border.color: effect.previewBorderColor(effect.previewMode)
|
|
||||||
|
|
||||||
Behavior on x {
|
|
||||||
enabled: effect.animatePreview
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: effect.previewAnimationDuration }
|
|
||||||
}
|
|
||||||
Behavior on y {
|
|
||||||
enabled: effect.animatePreview
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: effect.previewAnimationDuration }
|
|
||||||
}
|
|
||||||
Behavior on width {
|
|
||||||
enabled: effect.animatePreview
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: effect.previewAnimationDuration }
|
|
||||||
}
|
|
||||||
Behavior on height {
|
|
||||||
enabled: effect.animatePreview
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: effect.previewAnimationDuration }
|
|
||||||
}
|
|
||||||
Behavior on opacity {
|
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: effect.previewFadeDuration }
|
|
||||||
}
|
|
||||||
Behavior on color {
|
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: effect.previewFadeDuration }
|
|
||||||
}
|
|
||||||
Behavior on border.color {
|
|
||||||
MobileShell.MotionColorAnimation { type: MobileShell.Motion.EffectsFast; duration: effect.previewFadeDuration }
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.margins: 5
|
|
||||||
radius: Math.max(0, parent.radius - anchors.margins)
|
|
||||||
color: "transparent"
|
|
||||||
border.width: 1
|
|
||||||
border.color: Qt.rgba(1, 1, 1, 0.14)
|
|
||||||
opacity: effect.previewMode === "insert" ? 1 : 0.45
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: connectExistingWindows()
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"KPackageStructure": "KWin/Effect",
|
|
||||||
"KPlugin": {
|
|
||||||
"Authors": [
|
|
||||||
{
|
|
||||||
"Email": "marcoa@example.com",
|
|
||||||
"Name": "Marco Allegretti"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Category": "Appearance",
|
|
||||||
"Description": "Animated drag preview for SHIFT dynamic tiling in convergence mode.",
|
|
||||||
"EnabledByDefault": false,
|
|
||||||
"Id": "shift-tile-preview",
|
|
||||||
"License": "EUPL-1.2",
|
|
||||||
"Name": "SHIFT Tile Preview",
|
|
||||||
"Version": "1.0"
|
|
||||||
},
|
|
||||||
"X-KDE-Ordering": 61,
|
|
||||||
"X-Plasma-API": "declarativescript"
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,6 @@ import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.kwin 3.0 as KWinComponents
|
import org.kde.kwin 3.0 as KWinComponents
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -31,8 +30,6 @@ Item {
|
||||||
readonly property real dragOffset: -control.y
|
readonly property real dragOffset: -control.y
|
||||||
|
|
||||||
readonly property int currentIndex: model.index
|
readonly property int currentIndex: model.index
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
|
|
||||||
// whether this task is being interacted with
|
// whether this task is being interacted with
|
||||||
readonly property bool interactingActive: control.pressed && control.passedDragThreshold
|
readonly property bool interactingActive: control.pressed && control.passedDragThreshold
|
||||||
|
|
@ -140,11 +137,11 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on y {
|
NumberAnimation on y {
|
||||||
id: yAnimator
|
id: yAnimator
|
||||||
type: MobileShell.Motion.Standard
|
|
||||||
running: !control.pressed
|
running: !control.pressed
|
||||||
duration: delegate.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
to: 0
|
to: 0
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (to != 0) { // close app
|
if (to != 0) { // close app
|
||||||
|
|
@ -175,7 +172,7 @@ Item {
|
||||||
opacity: delegate.showHeader ? 1 : 0
|
opacity: delegate.showHeader ? 1 : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: delegate.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration }
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
|
|
@ -219,9 +216,12 @@ Item {
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// scale animation on press
|
// scale animation on press
|
||||||
property real zoomScale: control.pressed ? MobileShell.Motion.previewPressScale : 1
|
property real zoomScale: control.pressed ? 0.95 : 1
|
||||||
Behavior on zoomScale {
|
Behavior on zoomScale {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault }
|
NumberAnimation {
|
||||||
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.OutExpo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
transform: Scale {
|
transform: Scale {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
import org.kde.kwin 3.0 as KWinComponents
|
import org.kde.kwin 3.0 as KWinComponents
|
||||||
|
|
||||||
|
|
@ -106,7 +105,7 @@ MouseArea {
|
||||||
// dynamic task offset animation duration based off of the touch position and task scale
|
// dynamic task offset animation duration based off of the touch position and task scale
|
||||||
function dynamicDuration(left = true): int {
|
function dynamicDuration(left = true): int {
|
||||||
// if the close animation is running, use the standard long duration time for consistency
|
// if the close animation is running, use the standard long duration time for consistency
|
||||||
let duration = root.taskSwitcherHelpers.longAnimationDuration * 1.75
|
let duration = Kirigami.Units.longDuration * 1.75
|
||||||
if (!taskSwitcherHelpers.closeAnim.running && taskSwitcherHelpers.notHomeScreenState && taskSwitcherHelpers.gestureState != TaskSwitcherHelpers.GestureStates.HorizontalSwipe && !taskSwitcherHelpers.isInTaskScrubMode) {
|
if (!taskSwitcherHelpers.closeAnim.running && taskSwitcherHelpers.notHomeScreenState && taskSwitcherHelpers.gestureState != TaskSwitcherHelpers.GestureStates.HorizontalSwipe && !taskSwitcherHelpers.isInTaskScrubMode) {
|
||||||
// max out the scale at 1 so it is not too fast when opening the task drawer with the button
|
// max out the scale at 1 so it is not too fast when opening the task drawer with the button
|
||||||
let taskScale = Math.min(taskSwitcherHelpers.currentScale, 1)
|
let taskScale = Math.min(taskSwitcherHelpers.currentScale, 1)
|
||||||
|
|
@ -171,17 +170,16 @@ MouseArea {
|
||||||
// this is the x-position with respect to the list
|
// this is the x-position with respect to the list
|
||||||
property real listX: root.taskSwitcherHelpers.xPositionFromTaskIndex(currentIndex)
|
property real listX: root.taskSwitcherHelpers.xPositionFromTaskIndex(currentIndex)
|
||||||
Behavior on listX {
|
Behavior on listX {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.Standard
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.taskSwitcherHelpers.longAnimationDuration
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the animated task offset value (always will be 0 if it is the current task in the task drawer)
|
// the animated task offset value (always will be 0 if it is the current task in the task drawer)
|
||||||
property real taskOffsetNormalized: (root.baseTaskOffset * ((root.taskSwitcherHelpers.taskDrawerOpened && isCurrentTask) ? 0 : 1))
|
property real taskOffsetNormalized: (root.baseTaskOffset * ((root.taskSwitcherHelpers.taskDrawerOpened && isCurrentTask) ? 0 : 1))
|
||||||
Behavior on taskOffsetNormalized {
|
Behavior on taskOffsetNormalized {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.Standard
|
|
||||||
duration: root.taskSwitcherHelpers.currentDisplayTask > task.currentIndex ? root.taskOffsetDurationRight : root.taskOffsetDurationLeft
|
duration: root.taskSwitcherHelpers.currentDisplayTask > task.currentIndex ? root.taskOffsetDurationRight : root.taskOffsetDurationLeft
|
||||||
easing.type: root.taskOffsetEasing
|
easing.type: root.taskOffsetEasing
|
||||||
easing.overshoot: 0.85
|
easing.overshoot: 0.85
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,6 @@ FocusScope {
|
||||||
readonly property real bottomMargin: ShellSettings.Settings.autoHidePanelsEnabled ? 0 : navBottomMargin
|
readonly property real bottomMargin: ShellSettings.Settings.autoHidePanelsEnabled ? 0 : navBottomMargin
|
||||||
readonly property real leftMargin: 0
|
readonly property real leftMargin: 0
|
||||||
readonly property real rightMargin: ShellSettings.Settings.autoHidePanelsEnabled ? 0 : navRightMargin
|
readonly property real rightMargin: ShellSettings.Settings.autoHidePanelsEnabled ? 0 : navRightMargin
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
readonly property int veryLongAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow)
|
|
||||||
readonly property real disabledScrubArrowOpacity: 0.38
|
|
||||||
|
|
||||||
property var taskSwitcherHelpers: TaskSwitcherHelpers {
|
property var taskSwitcherHelpers: TaskSwitcherHelpers {
|
||||||
taskSwitcher: root
|
taskSwitcher: root
|
||||||
|
|
@ -67,7 +64,7 @@ FocusScope {
|
||||||
state.currentTaskIndex -= 1;
|
state.currentTaskIndex -= 1;
|
||||||
|
|
||||||
// animated at the same speed as the task x position in the TaskList so that the task appears not to move from the perspective of the user.
|
// animated at the same speed as the task x position in the TaskList so that the task appears not to move from the perspective of the user.
|
||||||
taskSwitcherHelpers.animateGoToTaskIndex(state.currentTaskIndex, taskSwitcherHelpers.longAnimationDuration, Easing.InOutQuad);
|
taskSwitcherHelpers.animateGoToTaskIndex(state.currentTaskIndex, Kirigami.Units.longDuration, Easing.InOutQuad);
|
||||||
taskSwitcherHelpers.lastClosedTask = -1;
|
taskSwitcherHelpers.lastClosedTask = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,10 +73,10 @@ FocusScope {
|
||||||
} else if (tasksCount < oldTasksCount) {
|
} else if (tasksCount < oldTasksCount) {
|
||||||
if (state.currentTaskIndex < 0) {
|
if (state.currentTaskIndex < 0) {
|
||||||
// if the user is on the first task, and it is closed, scroll right
|
// if the user is on the first task, and it is closed, scroll right
|
||||||
taskSwitcherHelpers.animateGoToTaskIndex(0, taskSwitcherHelpers.longAnimationDuration);
|
taskSwitcherHelpers.animateGoToTaskIndex(0, Kirigami.Units.longDuration);
|
||||||
} else if (state.currentTaskIndex >= tasksCount) {
|
} else if (state.currentTaskIndex >= tasksCount) {
|
||||||
// if the user is on the last task, and it is closed, scroll left
|
// if the user is on the last task, and it is closed, scroll left
|
||||||
taskSwitcherHelpers.animateGoToTaskIndex(tasksCount - 1, taskSwitcherHelpers.longAnimationDuration);
|
taskSwitcherHelpers.animateGoToTaskIndex(tasksCount - 1, Kirigami.Units.longDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -353,7 +350,7 @@ FocusScope {
|
||||||
if (!root.taskSwitcherHelpers.taskDrawerOpened && unmodifiedYposition < root.taskSwitcherHelpers.openedYPosition) {
|
if (!root.taskSwitcherHelpers.taskDrawerOpened && unmodifiedYposition < root.taskSwitcherHelpers.openedYPosition) {
|
||||||
// if in a app, switch it to the new task when it is under the openedYPosition
|
// if in a app, switch it to the new task when it is under the openedYPosition
|
||||||
taskList.setTaskOffsetValue(0, unmodifiedYposition < root.taskSwitcherHelpers.openedYPosition && root.taskSwitcherHelpers.notHomeScreenState);
|
taskList.setTaskOffsetValue(0, unmodifiedYposition < root.taskSwitcherHelpers.openedYPosition && root.taskSwitcherHelpers.notHomeScreenState);
|
||||||
root.taskSwitcherHelpers.openApp(newIndex, root.taskSwitcherHelpers.extendedAnimationDuration, Easing.OutExpo);
|
root.taskSwitcherHelpers.openApp(newIndex, Kirigami.Units.longDuration * 4, Easing.OutExpo);
|
||||||
} else {
|
} else {
|
||||||
// if already in the task switcher or above the openedYPosition, only change the focus to the new task
|
// if already in the task switcher or above the openedYPosition, only change the focus to the new task
|
||||||
root.taskSwitcherHelpers.animateGoToTaskIndex(newIndex);
|
root.taskSwitcherHelpers.animateGoToTaskIndex(newIndex);
|
||||||
|
|
@ -466,9 +463,8 @@ FocusScope {
|
||||||
property real backgroundColorOpacity: 1
|
property real backgroundColorOpacity: 1
|
||||||
Behavior on backgroundColorOpacity {
|
Behavior on backgroundColorOpacity {
|
||||||
id: backgroundColorOpacityAn
|
id: backgroundColorOpacityAn
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.SpatialDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.taskSwitcherHelpers.longAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -647,12 +643,12 @@ FocusScope {
|
||||||
anchors.bottomMargin: root.bottomMargin
|
anchors.bottomMargin: root.bottomMargin
|
||||||
anchors.topMargin: root.topMargin
|
anchors.topMargin: root.topMargin
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
id: closeAnim
|
id: closeAnim
|
||||||
type: MobileShell.Motion.Standard
|
|
||||||
running: false
|
running: false
|
||||||
to: 0
|
to: 0
|
||||||
duration: root.taskSwitcherHelpers.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
|
easing.type: Easing.InOutQuad
|
||||||
|
|
||||||
onFinished: {
|
onFinished: {
|
||||||
closeAllButton.closeRequested = false;
|
closeAllButton.closeRequested = false;
|
||||||
|
|
@ -668,7 +664,7 @@ FocusScope {
|
||||||
let baseOpacity = ((root.tasksCount === 0 && !root.taskSwitcherHelpers.currentlyBeingClosed) ? 0.9 : 0);
|
let baseOpacity = ((root.tasksCount === 0 && !root.taskSwitcherHelpers.currentlyBeingClosed) ? 0.9 : 0);
|
||||||
return root.taskSwitcherHelpers.gestureState == TaskSwitcherHelpers.GestureStates.TaskSwitcher ? baseOpacity : 0;
|
return root.taskSwitcherHelpers.gestureState == TaskSwitcherHelpers.GestureStates.TaskSwitcher ? baseOpacity : 0;
|
||||||
}
|
}
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsSlow; duration: root.veryLongAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.veryLongDuration } }
|
||||||
|
|
||||||
anchors.centerIn: container
|
anchors.centerIn: container
|
||||||
|
|
||||||
|
|
@ -696,7 +692,7 @@ FocusScope {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: scrubIconList
|
id: scrubIconList
|
||||||
opacity: root.taskSwitcherHelpers.isInTaskScrubMode ? 1 : 0
|
opacity: root.taskSwitcherHelpers.isInTaskScrubMode ? 1 : 0
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.taskSwitcherHelpers.longAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration } }
|
||||||
|
|
||||||
anchors.bottom: container.bottom
|
anchors.bottom: container.bottom
|
||||||
anchors.right: container.horizontalCenter
|
anchors.right: container.horizontalCenter
|
||||||
|
|
@ -708,8 +704,7 @@ FocusScope {
|
||||||
return -offset;
|
return -offset;
|
||||||
}
|
}
|
||||||
Behavior on anchors.rightMargin {
|
Behavior on anchors.rightMargin {
|
||||||
MobileShell.MotionNumberAnimation {
|
NumberAnimation {
|
||||||
type: MobileShell.Motion.SpatialDefault
|
|
||||||
duration: root.taskSwitcherHelpers.xAnimDuration;
|
duration: root.taskSwitcherHelpers.xAnimDuration;
|
||||||
easing.type: root.taskSwitcherHelpers.xAnimEasingType;
|
easing.type: root.taskSwitcherHelpers.xAnimEasingType;
|
||||||
}
|
}
|
||||||
|
|
@ -740,7 +735,7 @@ FocusScope {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: scrubIndicator
|
id: scrubIndicator
|
||||||
opacity: root.taskSwitcherHelpers.isInTaskScrubMode ? 1 : 0
|
opacity: root.taskSwitcherHelpers.isInTaskScrubMode ? 1 : 0
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialDefault; duration: root.taskSwitcherHelpers.longAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: 200 } }
|
||||||
|
|
||||||
anchors.bottom: container.bottom
|
anchors.bottom: container.bottom
|
||||||
anchors.horizontalCenter: container.horizontalCenter
|
anchors.horizontalCenter: container.horizontalCenter
|
||||||
|
|
@ -748,8 +743,8 @@ FocusScope {
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
id: iconScrubBack
|
id: iconScrubBack
|
||||||
opacity: root.state.currentTaskIndex == 0 ? root.disabledScrubArrowOpacity : 1
|
opacity: root.state.currentTaskIndex == 0 ? 0.3 : 1
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialExtended; duration: root.taskSwitcherHelpers.taskScrubAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration * 2; easing.type: Easing.OutExpo } }
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
implicitWidth: Kirigami.Units.iconSizes.medium
|
implicitWidth: Kirigami.Units.iconSizes.medium
|
||||||
implicitHeight: Kirigami.Units.iconSizes.medium
|
implicitHeight: Kirigami.Units.iconSizes.medium
|
||||||
|
|
@ -763,8 +758,8 @@ FocusScope {
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
id: iconScrubFront
|
id: iconScrubFront
|
||||||
opacity: root.state.currentTaskIndex == root.tasksCount - 1 ? root.disabledScrubArrowOpacity : 1
|
opacity: root.state.currentTaskIndex == root.tasksCount - 1 ? 0.3 : 1
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.SpatialExtended; duration: root.taskSwitcherHelpers.taskScrubAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration * 2; easing.type: Easing.OutExpo } }
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
implicitWidth: Kirigami.Units.iconSizes.medium
|
implicitWidth: Kirigami.Units.iconSizes.medium
|
||||||
implicitHeight: Kirigami.Units.iconSizes.medium
|
implicitHeight: Kirigami.Units.iconSizes.medium
|
||||||
|
|
@ -814,7 +809,7 @@ FocusScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
opacity: (root.taskSwitcherHelpers.currentlyBeingClosed || root.state.gestureInProgress || !root.taskSwitcherHelpers.taskDrawerOpened) ? 0.0 : 1.0
|
opacity: (root.taskSwitcherHelpers.currentlyBeingClosed || root.state.gestureInProgress || !root.taskSwitcherHelpers.taskDrawerOpened) ? 0.0 : 1.0
|
||||||
Behavior on opacity { MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration } }
|
Behavior on opacity { NumberAnimation { duration: Kirigami.Units.shortDuration } }
|
||||||
|
|
||||||
icon.name: "edit-clear-history"
|
icon.name: "edit-clear-history"
|
||||||
font.bold: true
|
font.bold: true
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ pragma ComponentBehavior: Bound
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.taskswitcherplugin as TaskSwitcherPlugin
|
import org.kde.plasma.private.mobileshell.taskswitcherplugin as TaskSwitcherPlugin
|
||||||
|
|
||||||
import org.kde.kwin 3.0 as KWinComponents
|
import org.kde.kwin 3.0 as KWinComponents
|
||||||
|
|
@ -98,13 +97,7 @@ QtObject {
|
||||||
property bool reachedHeightThreshold: false
|
property bool reachedHeightThreshold: false
|
||||||
|
|
||||||
// made as variables to keep x anim in task list and task scrub icon list in sync
|
// made as variables to keep x anim in task list and task scrub icon list in sync
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialFast)
|
property int xAnimDuration: Kirigami.Units.longDuration * 2
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialDefault)
|
|
||||||
readonly property int primaryAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Emphasized)
|
|
||||||
readonly property int taskScrubAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialExtended)
|
|
||||||
readonly property int extendedAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialVerySlow)
|
|
||||||
readonly property real closeScaleOut: MobileShell.Motion.closeScaleOut
|
|
||||||
property int xAnimDuration: taskScrubAnimationDuration
|
|
||||||
property int xAnimEasingType: Easing.OutExpo
|
property int xAnimEasingType: Easing.OutExpo
|
||||||
|
|
||||||
// ~~ measurement constants ~~
|
// ~~ measurement constants ~~
|
||||||
|
|
@ -239,12 +232,12 @@ QtObject {
|
||||||
closeFactorAnim.restart();
|
closeFactorAnim.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
function openApp(index: int, duration = root.shortAnimationDuration, horizontalEasing = Easing.OutCubic): void {
|
function openApp(index: int, duration = Kirigami.Units.shortDuration, horizontalEasing = Easing.OutBack): void {
|
||||||
// cancel any opening animations ongoing
|
// cancel any opening animations ongoing
|
||||||
openAnim.stop();
|
openAnim.stop();
|
||||||
cancelAnimations();
|
cancelAnimations();
|
||||||
|
|
||||||
animateGoToTaskIndex(index, duration, horizontalEasing);
|
animateGoToTaskIndex(index, duration);
|
||||||
openAppAnim.restart();
|
openAppAnim.restart();
|
||||||
KWinComponents.Workspace.activeWindow = taskList.getTaskAt(index).window;
|
KWinComponents.Workspace.activeWindow = taskList.getTaskAt(index).window;
|
||||||
}
|
}
|
||||||
|
|
@ -260,8 +253,8 @@ QtObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
// go to the task index, animated
|
// go to the task index, animated
|
||||||
function animateGoToTaskIndex(index: int, duration = root.taskScrubAnimationDuration, easing = Easing.OutExpo): void {
|
function animateGoToTaskIndex(index: int, duration = Kirigami.Units.longDuration * 2, easing = Easing.OutExpo): void {
|
||||||
xAnimDuration = MobileShell.Motion.enabled ? duration : 0;
|
xAnimDuration = duration;
|
||||||
xAnimEasingType = easing;
|
xAnimEasingType = easing;
|
||||||
xAnim.to = xPositionFromTaskIndex(index) - (gestureState == TaskSwitcherHelpers.GestureStates.HorizontalSwipe && !state.gestureInProgress && notHomeScreenState ? taskSpacing / 2 : 0);
|
xAnim.to = xPositionFromTaskIndex(index) - (gestureState == TaskSwitcherHelpers.GestureStates.HorizontalSwipe && !state.gestureInProgress && notHomeScreenState ? taskSpacing / 2 : 0);
|
||||||
xAnim.restart();
|
xAnim.restart();
|
||||||
|
|
@ -316,20 +309,19 @@ QtObject {
|
||||||
|
|
||||||
// ~~ property animators ~~
|
// ~~ property animators ~~
|
||||||
|
|
||||||
property var xAnim: MobileShell.MotionNumberAnimation {
|
property var xAnim: NumberAnimation {
|
||||||
target: root.state
|
target: root.state
|
||||||
property: "xPosition"
|
property: "xPosition"
|
||||||
type: MobileShell.Motion.SpatialDefault
|
|
||||||
duration: root.xAnimDuration
|
duration: root.xAnimDuration
|
||||||
easing.type: root.xAnimEasingType
|
easing.type: root.xAnimEasingType
|
||||||
}
|
}
|
||||||
|
|
||||||
property var openAnim: MobileShell.MotionNumberAnimation {
|
property var openAnim: NumberAnimation {
|
||||||
target: root.state
|
target: root.state
|
||||||
property: "yPosition"
|
property: "yPosition"
|
||||||
to: root.openedYPosition
|
to: root.openedYPosition
|
||||||
type: MobileShell.Motion.EmphasizedDecel
|
duration: 250
|
||||||
duration: root.primaryAnimationDuration
|
easing.type: Easing.OutQuart
|
||||||
|
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (!root.isInTaskScrubMode) {
|
if (!root.isInTaskScrubMode) {
|
||||||
|
|
@ -338,13 +330,15 @@ QtObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mirror the opening deceleration with an accelerating exit, without overshooting the gesture path.
|
// TODO: This animation should ideally be replaced by some
|
||||||
property var closeAnim: MobileShell.MotionNumberAnimation {
|
// speed tracking to track finger movement better. Until then
|
||||||
|
// InBack at least pretends to go in the finger move direction
|
||||||
|
property var closeAnim: NumberAnimation {
|
||||||
target: root.state
|
target: root.state
|
||||||
property: "yPosition"
|
property: "yPosition"
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.EmphasizedAccel
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.primaryAnimationDuration
|
easing.type: Easing.InBack
|
||||||
|
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.inLastFrame = true;
|
root.inLastFrame = true;
|
||||||
|
|
@ -353,32 +347,32 @@ QtObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property var closeScaleAnim: MobileShell.MotionNumberAnimation {
|
property var closeScaleAnim: NumberAnimation {
|
||||||
target: root
|
target: root
|
||||||
property: "closingScalingFactor"
|
property: "closingScalingFactor"
|
||||||
to: root.closeScaleOut
|
to: 0.1
|
||||||
type: MobileShell.Motion.EmphasizedAccel
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.primaryAnimationDuration
|
easing.type: Easing.InQuad
|
||||||
|
|
||||||
onStopped: {
|
onStopped: {
|
||||||
root.closingScalingFactor = 1;
|
root.closingScalingFactor = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property var closeFactorAnim: MobileShell.MotionNumberAnimation {
|
property var closeFactorAnim: NumberAnimation {
|
||||||
target: root
|
target: root
|
||||||
property: "closingFactor"
|
property: "closingFactor"
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.EmphasizedAccel
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.primaryAnimationDuration
|
easing.type: Easing.InQuad
|
||||||
}
|
}
|
||||||
|
|
||||||
property var openAppAnim: MobileShell.MotionNumberAnimation {
|
property var openAppAnim: NumberAnimation {
|
||||||
target: root.state
|
target: root.state
|
||||||
property: "yPosition"
|
property: "yPosition"
|
||||||
to: 0
|
to: 0
|
||||||
type: MobileShell.Motion.Emphasized
|
duration: 300
|
||||||
duration: root.primaryAnimationDuration
|
easing.type: Easing.OutQuint
|
||||||
onFinished: {
|
onFinished: {
|
||||||
root.inLastFrame = true;
|
root.inLastFrame = true;
|
||||||
root.state.status = TaskSwitcherPlugin.MobileTaskSwitcherState.Inactive;
|
root.state.status = TaskSwitcherPlugin.MobileTaskSwitcherState.Inactive;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
Loader {
|
Loader {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property var currentWindow: null
|
property var currentWindow
|
||||||
|
|
||||||
// Windows awaiting geometry clamping after un-maximize in convergence
|
// Windows awaiting geometry clamping after un-maximize in convergence
|
||||||
// mode. Using an array so concurrent un-maximizes are not lost.
|
// mode. Using an array so concurrent un-maximizes are not lost.
|
||||||
|
|
@ -28,7 +28,6 @@ Loader {
|
||||||
root.pendingConstrainWindows = []
|
root.pendingConstrainWindows = []
|
||||||
for (const window of windows) {
|
for (const window of windows) {
|
||||||
if (!window || window.deleted || !window.normalWindow) continue
|
if (!window || window.deleted || !window.normalWindow) continue
|
||||||
if (root.dynamicTilingOwnsWindowPlacement()) continue
|
|
||||||
if (!ShellSettings.Settings.convergenceModeEnabled) continue
|
if (!ShellSettings.Settings.convergenceModeEnabled) continue
|
||||||
if (ShellSettings.Settings.gamingModeEnabled) continue
|
if (ShellSettings.Settings.gamingModeEnabled) continue
|
||||||
|
|
||||||
|
|
@ -53,22 +52,11 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function dynamicTilingOwnsWindowPlacement() {
|
|
||||||
return ShellSettings.Settings.convergenceModeEnabled
|
|
||||||
&& ShellSettings.Settings.dynamicTilingEnabled
|
|
||||||
&& !ShellSettings.Settings.gamingModeEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
function run(window) {
|
function run(window) {
|
||||||
if (!window || window.deleted || !window.normalWindow) {
|
if (!window || window.deleted || !window.normalWindow) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.dynamicTilingOwnsWindowPlacement()) {
|
|
||||||
window.noBorder = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// HACK: don't maximize xwaylandvideobridge
|
// HACK: don't maximize xwaylandvideobridge
|
||||||
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
// see: https://invent.kde.org/plasma/plasma-mobile/-/issues/324
|
||||||
if (window.resourceClass === 'xwaylandvideobridge') {
|
if (window.resourceClass === 'xwaylandvideobridge') {
|
||||||
|
|
@ -109,7 +97,7 @@ Loader {
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: root.currentWindow
|
target: currentWindow
|
||||||
|
|
||||||
function onFullScreenChanged() {
|
function onFullScreenChanged() {
|
||||||
if (!currentWindow) {
|
if (!currentWindow) {
|
||||||
|
|
@ -165,16 +153,6 @@ Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDynamicTilingEnabledChanged() {
|
|
||||||
const windows = KWinComponents.Workspace.windows;
|
|
||||||
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
|
||||||
if (windows[i].normalWindow) {
|
|
||||||
root.run(windows[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -21,7 +21,6 @@ Item {
|
||||||
property alias circleOpacity: buttonRect.opacity
|
property alias circleOpacity: buttonRect.opacity
|
||||||
property alias circleVisiblity: buttonRect.visible
|
property alias circleVisiblity: buttonRect.visible
|
||||||
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software
|
||||||
readonly property color buttonBorderColor: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.65)
|
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
||||||
|
|
@ -40,7 +39,7 @@ Item {
|
||||||
color: Kirigami.Theme.backgroundColor
|
color: Kirigami.Theme.backgroundColor
|
||||||
opacity: mouseArea.containsPress ? 1 : 0.6
|
opacity: mouseArea.containsPress ? 1 : 0.6
|
||||||
border {
|
border {
|
||||||
color: root.buttonBorderColor
|
color: Qt.rgba(255, 255, 255, 0.8)
|
||||||
width: 1
|
width: 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,10 @@ import org.kde.kirigami as Kirigami
|
||||||
import org.kde.coreaddons 1.0 as KCoreAddons
|
import org.kde.coreaddons 1.0 as KCoreAddons
|
||||||
|
|
||||||
import org.kde.plasma.private.sessions 2.0
|
import org.kde.plasma.private.sessions 2.0
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property real backgroundDimOpacity: 0.6
|
|
||||||
|
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
|
|
@ -74,15 +71,15 @@ Item {
|
||||||
target: buttons
|
target: buttons
|
||||||
from: 0
|
from: 0
|
||||||
to: 1
|
to: 1
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
target: background
|
target: background
|
||||||
from: 0
|
from: 0
|
||||||
to: root.backgroundDimOpacity
|
to: 0.6
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -101,22 +98,22 @@ Item {
|
||||||
target: buttons
|
target: buttons
|
||||||
from: 1
|
from: 1
|
||||||
to: 0
|
to: 0
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
target: background
|
target: background
|
||||||
from: root.backgroundDimOpacity
|
from: 0.6
|
||||||
to: 0
|
to: 0
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
target: blackOverlay
|
target: blackOverlay
|
||||||
from: 0
|
from: 0
|
||||||
to: closeAnim.closeToBlack ? 1 : 0
|
to: closeAnim.closeToBlack ? 1 : 0
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScriptAction {
|
ScriptAction {
|
||||||
|
|
@ -125,7 +122,7 @@ Item {
|
||||||
closeAnim.callback();
|
closeAnim.callback();
|
||||||
}
|
}
|
||||||
buttons.opacity = 1;
|
buttons.opacity = 1;
|
||||||
background.opacity = root.backgroundDimOpacity;
|
background.opacity = 0.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -16,9 +15,6 @@ Rectangle {
|
||||||
property int stage
|
property int stage
|
||||||
|
|
||||||
readonly property bool busy: stage > 1 && stage < 6
|
readonly property bool busy: stage > 1 && stage < 6
|
||||||
readonly property int longAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
readonly property int veryLongAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow)
|
|
||||||
readonly property int spinnerAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.EffectsSlow) * 3.5)
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: content
|
id: content
|
||||||
|
|
@ -29,8 +25,8 @@ Rectangle {
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
duration: root.veryLongAnimationDuration
|
duration: Kirigami.Units.veryLongDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsSlow)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,8 +63,8 @@ Rectangle {
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
duration: root.longAnimationDuration
|
duration: Kirigami.Units.longDuration
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.EffectsDefault)
|
easing.type: Easing.InOutQuad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -93,9 +89,9 @@ Rectangle {
|
||||||
RotationAnimator on rotation {
|
RotationAnimator on rotation {
|
||||||
from: 0
|
from: 0
|
||||||
to: 360
|
to: 360
|
||||||
duration: root.spinnerAnimationDuration
|
duration: 1400
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
running: root.busy && MobileShell.Motion.enabled
|
running: root.busy && Kirigami.Units.longDuration > 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import org.kde.plasma.plasmoid
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
import org.kde.plasma.configuration 2.0
|
import org.kde.plasma.configuration 2.0
|
||||||
import org.kde.kitemmodels 1.0 as KItemModels
|
import org.kde.kitemmodels 1.0 as KItemModels
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
import './private'
|
import './private'
|
||||||
|
|
||||||
|
|
@ -29,7 +28,6 @@ Item {
|
||||||
property bool isContainment: false
|
property bool isContainment: false
|
||||||
property alias app: appLoader.item
|
property alias app: appLoader.item
|
||||||
property bool loadApp: true
|
property bool loadApp: true
|
||||||
readonly property int appAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsDefault)
|
|
||||||
|
|
||||||
signal appLoaded()
|
signal appLoaded()
|
||||||
|
|
||||||
|
|
@ -134,10 +132,10 @@ Item {
|
||||||
opacity: 0
|
opacity: 0
|
||||||
scale: 0.7 + 0.3 * app.opacity
|
scale: 0.7 + 0.3 * app.opacity
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on opacity {
|
NumberAnimation on opacity {
|
||||||
id: opacityAnim
|
id: opacityAnim
|
||||||
type: MobileShell.Motion.EffectsDefault
|
duration: Kirigami.Units.longDuration
|
||||||
duration: root.appAnimationDuration
|
easing.type: Easing.OutCubic
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (app.opacity === 0) {
|
if (app.opacity === 0) {
|
||||||
root.Window.window.close();
|
root.Window.window.close();
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@ MobileShell.SwipeArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation on position {
|
NumberAnimation on position {
|
||||||
id: positionAnim
|
id: positionAnim
|
||||||
type: MobileShell.Motion.SpatialSlow
|
|
||||||
duration: root.animationDuration
|
duration: root.animationDuration
|
||||||
|
easing.type: Easing.OutExpo
|
||||||
|
|
||||||
onFinished: {
|
onFinished: {
|
||||||
if (root.position === keypadHeight) {
|
if (root.position === keypadHeight) {
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
required property real openProgress
|
required property real openProgress
|
||||||
required property var lockScreenState
|
required property var lockScreenState
|
||||||
readonly property int layoutAnimationDuration: openProgress > 0.5 ? MobileShell.Motion.duration(MobileShell.Motion.Emphasized) : 0
|
|
||||||
readonly property int shortAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.EffectsFast)
|
|
||||||
|
|
||||||
property alias passwordBar: passwordBar
|
property alias passwordBar: passwordBar
|
||||||
|
|
||||||
|
|
@ -65,8 +63,8 @@ Item {
|
||||||
|
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
AnchorAnimation {
|
AnchorAnimation {
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCirc
|
||||||
duration: root.layoutAnimationDuration
|
duration: openProgress > 0.5 ? 300 : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -104,8 +102,8 @@ Item {
|
||||||
|
|
||||||
transitions: Transition {
|
transitions: Transition {
|
||||||
AnchorAnimation {
|
AnchorAnimation {
|
||||||
easing.type: MobileShell.Motion.easing(MobileShell.Motion.Emphasized)
|
easing.type: Easing.OutCirc
|
||||||
duration: root.layoutAnimationDuration
|
duration: openProgress > 0.5 ? 300 : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +126,7 @@ Item {
|
||||||
Layout.topMargin: keypadVerticalContainer.visible ? Kirigami.Units.gridUnit * 3 : 0
|
Layout.topMargin: keypadVerticalContainer.visible ? Kirigami.Units.gridUnit * 3 : 0
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.EffectsFast; duration: root.shortAnimationDuration }
|
NumberAnimation { duration: Kirigami.Units.shortDuration }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -174,8 +172,8 @@ Item {
|
||||||
opacity: enabled
|
opacity: enabled
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
PauseAnimation { duration: MobileShell.Motion.enabled ? 20 * index : 0 }
|
PauseAnimation { duration: 20 * index }
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Emphasized; duration: root.layoutAnimationDuration }
|
NumberAnimation { duration: 300 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Item {
|
||||||
property alias passwordBar: keypad.passwordBar
|
property alias passwordBar: keypad.passwordBar
|
||||||
|
|
||||||
// Speed up animation when passwordless
|
// Speed up animation when passwordless
|
||||||
animationDuration: MobileShell.Motion.duration(MobileShell.Motion.SpatialSlow)
|
animationDuration: Kirigami.Units.veryLongDuration
|
||||||
|
|
||||||
// Distance to swipe to fully open keypad
|
// Distance to swipe to fully open keypad
|
||||||
keypadHeight: Kirigami.Units.gridUnit * 20
|
keypadHeight: Kirigami.Units.gridUnit * 20
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import QtQuick.Layouts
|
||||||
|
|
||||||
import org.kde.plasma.workspace.keyboardlayout 1.0
|
import org.kde.plasma.workspace.keyboardlayout 1.0
|
||||||
import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
|
import org.kde.plasma.workspace.keyboardlayout 1.0 as Keyboards
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
|
||||||
|
|
||||||
import org.kde.kirigami as Kirigami
|
import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
|
|
@ -24,12 +23,9 @@ Rectangle {
|
||||||
|
|
||||||
readonly property color headerTextColor: Qt.rgba(255, 255, 255, 1)
|
readonly property color headerTextColor: Qt.rgba(255, 255, 255, 1)
|
||||||
readonly property color headerTextInactiveColor: Qt.rgba(255, 255, 255, 0.4)
|
readonly property color headerTextInactiveColor: Qt.rgba(255, 255, 255, 0.4)
|
||||||
readonly property color passwordBarSurfaceColor: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.18)
|
|
||||||
readonly property int quickAnimationDuration: Math.round(MobileShell.Motion.duration(MobileShell.Motion.Press) * 2 / 3)
|
|
||||||
readonly property int previewAnimationDuration: MobileShell.Motion.duration(MobileShell.Motion.Press)
|
|
||||||
|
|
||||||
radius: Kirigami.Units.largeSpacing
|
radius: Kirigami.Units.largeSpacing
|
||||||
color: root.passwordBarSurfaceColor
|
color: Qt.rgba(255, 255, 255, 0.2)
|
||||||
|
|
||||||
// model for shown dots
|
// model for shown dots
|
||||||
// we need to use a listmodel to avoid all delegates from reloading
|
// we need to use a listmodel to avoid all delegates from reloading
|
||||||
|
|
@ -227,7 +223,7 @@ Rectangle {
|
||||||
model: dotDisplayModel
|
model: dotDisplayModel
|
||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
MobileShell.MotionNumberAnimation { type: MobileShell.Motion.Press; duration: root.quickAnimationDuration }
|
NumberAnimation { duration: 50 }
|
||||||
}
|
}
|
||||||
|
|
||||||
onImplicitWidthChanged: {
|
onImplicitWidthChanged: {
|
||||||
|
|
@ -246,7 +242,7 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (showChar) {
|
if (showChar) {
|
||||||
charAnimation.to = 1;
|
charAnimation.to = 1;
|
||||||
charAnimation.duration = root.previewAnimationDuration;
|
charAnimation.duration = 75;
|
||||||
charAnimation.restart();
|
charAnimation.restart();
|
||||||
} else {
|
} else {
|
||||||
dotAnimation.to = 1;
|
dotAnimation.to = 1;
|
||||||
|
|
@ -257,7 +253,7 @@ Rectangle {
|
||||||
onShowCharChanged: {
|
onShowCharChanged: {
|
||||||
if (!showChar) {
|
if (!showChar) {
|
||||||
charAnimation.to = 0;
|
charAnimation.to = 0;
|
||||||
charAnimation.duration = root.quickAnimationDuration;
|
charAnimation.duration = 50;
|
||||||
charAnimation.restart();
|
charAnimation.restart();
|
||||||
dotAnimation.to = 1;
|
dotAnimation.to = 1;
|
||||||
dotAnimation.start();
|
dotAnimation.start();
|
||||||
|
|
@ -273,12 +269,11 @@ Rectangle {
|
||||||
radius: width
|
radius: width
|
||||||
color: lockScreenState.waitingForAuth ? root.headerTextInactiveColor : root.headerTextColor // dim when waiting for auth
|
color: lockScreenState.waitingForAuth ? root.headerTextInactiveColor : root.headerTextColor // dim when waiting for auth
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
id: dotAnimation
|
id: dotAnimation
|
||||||
target: dot;
|
target: dot;
|
||||||
property: "scale";
|
property: "scale";
|
||||||
type: MobileShell.Motion.Press
|
duration: 50
|
||||||
duration: root.quickAnimationDuration
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -290,11 +285,10 @@ Rectangle {
|
||||||
text: model.char
|
text: model.char
|
||||||
font.pointSize: 12
|
font.pointSize: 12
|
||||||
|
|
||||||
MobileShell.MotionNumberAnimation {
|
PropertyAnimation {
|
||||||
id: charAnimation
|
id: charAnimation
|
||||||
target: charLabel;
|
target: charLabel;
|
||||||
property: "scale";
|
property: "scale";
|
||||||
type: MobileShell.Motion.Press
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue