Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions shell/plugins/dock/AppGrid.qml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ Item {
color: Commons.Color.menu.scrim
opacity: root.dragging ? 0 : 1

Behavior on opacity { NumberAnimation { duration: 150 } }
Behavior on opacity {
id: scrimFade
NumberAnimation { duration: Style.duration(scrimFade.targetValue > 0 ? 150 : 100); easing.type: Easing.OutCubic }
}
}

MouseArea {
Expand All @@ -198,7 +201,10 @@ Item {
padding: root.contentMargin
opacity: root.dragging ? 0 : 1

Behavior on opacity { NumberAnimation { duration: 150 } }
Behavior on opacity {
id: cardFade
NumberAnimation { duration: Style.duration(cardFade.targetValue > 0 ? 150 : 100); easing.type: Easing.OutCubic }
}

MouseArea {
anchors.fill: parent
Expand Down
20 changes: 14 additions & 6 deletions shell/plugins/dock/DockWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,15 @@ PanelWindow {
// where it belongs at once.
property real tuck: window.tucked ? window.slotSize + window.gap : 0

// Tucking away is quicker than coming back. A gentler curve than
// Style.easeOut, which crosses the short slide in a frame or two.
Behavior on tuck {
id: tuckMotion
enabled: window.shown
NumberAnimation { duration: 180; easing.type: Easing.OutCubic }
NumberAnimation {
duration: Style.duration(tuckMotion.targetValue > 0 ? 120 : 180)
easing.type: Easing.OutCubic
}
}

x: window.position === "left" ? window.gap - tuck
Expand Down Expand Up @@ -345,7 +351,7 @@ PanelWindow {

Behavior on displayedShift {
enabled: window.animateShifts
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
NumberAnimation { duration: Style.duration(150); easing.type: Easing.Bezier; easing.bezierCurve: Style.easeOut }
}

transform: Translate {
Expand Down Expand Up @@ -373,7 +379,7 @@ PanelWindow {
scale: appsSlot.hovered ? 1.15 : 1
transformOrigin: window.popOrigin

Behavior on scale { NumberAnimation { duration: 120; easing.type: Easing.OutCubic } }
Behavior on scale { NumberAnimation { duration: Style.duration(120); easing.type: Easing.OutCubic } }

Grid {
readonly property int square: Math.round(window.iconSize * 0.22)
Expand Down Expand Up @@ -423,7 +429,7 @@ PanelWindow {
// where they were shown.
Behavior on displayedShift {
enabled: window.animateShifts && ((window.dragging && !appSlot.lifted) || window.insertIndex >= 0)
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
NumberAnimation { duration: Style.duration(150); easing.type: Easing.Bezier; easing.bezierCurve: Style.easeOut }
}

z: lifted ? 1 : 0
Expand Down Expand Up @@ -508,11 +514,13 @@ PanelWindow {
scale: appSlot.lifted || appSlot.hovered ? 1.15 : 1
transformOrigin: window.popOrigin

Behavior on scale { NumberAnimation { duration: 120; easing.type: Easing.OutCubic } }
Behavior on scale { NumberAnimation { duration: Style.duration(120); easing.type: Easing.OutCubic } }
}

// With animations off it holds still rather than spinning through
// zero-length steps.
SequentialAnimation {
running: appSlot.launching
running: appSlot.launching && !Style.reduceMotion
loops: Animation.Infinite
onRunningChanged: if (!running) appSlot.pulse = 1

Expand Down
Loading