mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 21:45:38 -05:00
revise notification position and animations
This commit is contained in:
@@ -70,7 +70,9 @@ Column {
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: 100
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,7 +92,9 @@ Column {
|
||||
|
||||
Behavior on scale {
|
||||
NumberAnimation {
|
||||
duration: 150
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standard
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -411,8 +411,8 @@ Item {
|
||||
|
||||
SequentialAnimation on scale {
|
||||
running: root.unlocking
|
||||
NumberAnimation { from: 0; to: 1.2; duration: 200; easing.type: Easing.OutBack }
|
||||
NumberAnimation { from: 1.2; to: 1; duration: 150; easing.type: Easing.InBack }
|
||||
NumberAnimation { from: 0; to: 1.2; duration: Anims.durShort; easing.type: Easing.BezierSpline; easing.bezierCurve: Anims.emphasizedDecel }
|
||||
NumberAnimation { from: 1.2; to: 1; duration: Anims.durShort; easing.type: Easing.BezierSpline; easing.bezierCurve: Anims.emphasizedAccel }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ Item {
|
||||
RotationAnimation on rotation {
|
||||
running: pam.active && !root.unlocking
|
||||
loops: Animation.Infinite
|
||||
duration: 1000
|
||||
duration: Anims.durLong
|
||||
from: 0
|
||||
to: 360
|
||||
}
|
||||
|
||||
@@ -27,19 +27,23 @@ PanelWindow {
|
||||
}
|
||||
|
||||
margins {
|
||||
top: Theme.barHeight + 16
|
||||
top: Theme.barHeight + 4
|
||||
right: 12
|
||||
}
|
||||
|
||||
// Manager drives vertical stacking with this proxy:
|
||||
property int screenY: 0
|
||||
onScreenYChanged: margins.top = Theme.barHeight + 16 + screenY
|
||||
onScreenYChanged: margins.top = Theme.barHeight + 4 + screenY
|
||||
|
||||
// Disable vertical tween while exiting so there is never diagonal motion
|
||||
Behavior on screenY {
|
||||
id: screenYAnim
|
||||
enabled: !exiting
|
||||
NumberAnimation { duration: 220; easing.type: Easing.OutCubic }
|
||||
NumberAnimation {
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standardDecel
|
||||
}
|
||||
}
|
||||
|
||||
// State
|
||||
@@ -47,13 +51,12 @@ PanelWindow {
|
||||
signal entered()
|
||||
signal exitFinished()
|
||||
|
||||
// ---------------- CONTENT: animate this (not the Window) ----------------
|
||||
Item {
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
|
||||
// We animate a Translate so anchors never override horizontal motion
|
||||
transform: Translate { id: tx; x: 400 } // start off-screen right
|
||||
transform: Translate { id: tx; x: Anims.slidePx } // start off-screen right
|
||||
|
||||
// Optional: layer while animating for smoothness
|
||||
layer.enabled: (enterX.running || exitAnim.running)
|
||||
@@ -303,21 +306,37 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- EXPLICIT ANIMATIONS (no Behavior races) ----------------
|
||||
// Entrance (guaranteed): 400 -> 0
|
||||
// Entrance: slide in from right using slowed Anims curves
|
||||
NumberAnimation {
|
||||
id: enterX
|
||||
target: tx; property: "x"; from: 400; to: 0
|
||||
duration: 240; easing.type: Easing.OutCubic
|
||||
target: tx; property: "x"; from: Anims.slidePx; to: 0
|
||||
duration: Anims.durMed
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.emphasizedDecel
|
||||
onStopped: if (!win.exiting && Math.abs(tx.x) < 0.5) win.entered();
|
||||
}
|
||||
|
||||
// Exit (guaranteed): (x: 0 -> 96) + (opacity: 1 -> 0)
|
||||
// Exit: slide out to right + fade using slowed Anims curves
|
||||
ParallelAnimation {
|
||||
id: exitAnim
|
||||
PropertyAnimation { target: tx; property: "x"; from: 0; to: 96; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { target: content; property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutCubic }
|
||||
NumberAnimation { target: content; property: "scale"; from: 1; to: 0.98; duration: 160; easing.type: Easing.OutCubic }
|
||||
PropertyAnimation {
|
||||
target: tx; property: "x"; from: 0; to: Anims.slidePx
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.emphasizedAccel
|
||||
}
|
||||
NumberAnimation {
|
||||
target: content; property: "opacity"; from: 1; to: 0
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standardAccel
|
||||
}
|
||||
NumberAnimation {
|
||||
target: content; property: "scale"; from: 1; to: 0.98
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.emphasizedAccel
|
||||
}
|
||||
onStopped: finalizeExit("animStopped")
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import qs.Services
|
||||
|
||||
QtObject {
|
||||
id: manager
|
||||
property int topMargin: 48
|
||||
property int baseNotificationHeight: 132
|
||||
property int topMargin: 0
|
||||
property int baseNotificationHeight: 120
|
||||
property int maxTargetNotifications: 3
|
||||
property var popupWindows: [] // strong refs to windows (live until exitFinished)
|
||||
|
||||
|
||||
@@ -99,8 +99,9 @@ Item {
|
||||
|
||||
Behavior on height {
|
||||
NumberAnimation {
|
||||
duration: 80
|
||||
easing.type: Easing.OutQuad
|
||||
duration: Anims.durShort
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standardDecel
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,14 +44,16 @@ Rectangle {
|
||||
|
||||
NumberAnimation {
|
||||
to: 0.6
|
||||
duration: 1000
|
||||
easing.type: Easing.InOutQuad
|
||||
duration: Anims.durLong
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standard
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
to: 1
|
||||
duration: 1000
|
||||
easing.type: Easing.InOutQuad
|
||||
duration: Anims.durLong
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Anims.standard
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user