mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
Fix some animations not following setting
This commit is contained in:
parent
a18313b447
commit
ce06af0e8a
3 changed files with 11 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ QuickSettingsDelegate {
|
|||
iconItem: icon
|
||||
|
||||
// scale animation on press
|
||||
zoomScale: mouseArea.pressed ? 0.9 : 1
|
||||
zoomScale: (MobileShell.MobileShellSettings.animationsEnabled && mouseArea.pressed) ? 0.9 : 1
|
||||
|
||||
background: Rectangle {
|
||||
anchors.fill: parent
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ QuickSettingsDelegate {
|
|||
iconItem: icon
|
||||
|
||||
// scale animation on press
|
||||
zoomScale: mouseArea.pressed ? 0.9 : 1
|
||||
zoomScale: (MobileShell.MobileShellSettings.animationsEnabled && mouseArea.pressed) ? 0.9 : 1
|
||||
|
||||
background: Rectangle {
|
||||
radius: PlasmaCore.Units.smallSpacing
|
||||
|
|
|
|||
|
|
@ -114,27 +114,30 @@ Item {
|
|||
Component.onCompleted: zoomIn()
|
||||
|
||||
function zoomIn() {
|
||||
// don't use check animationsEnabled here, so we ensure the scale and opacity is always 1 when disabled
|
||||
scaleAnim.to = 1;
|
||||
scaleAnim.restart();
|
||||
opacityAnim.to = 1;
|
||||
opacityAnim.restart();
|
||||
}
|
||||
function zoomOut() {
|
||||
scaleAnim.to = 0.8;
|
||||
scaleAnim.restart();
|
||||
opacityAnim.to = 0;
|
||||
opacityAnim.restart();
|
||||
if (MobileShell.MobileShellSettings.animationsEnabled) {
|
||||
scaleAnim.to = 0.8;
|
||||
scaleAnim.restart();
|
||||
opacityAnim.to = 0;
|
||||
opacityAnim.restart();
|
||||
}
|
||||
}
|
||||
|
||||
NumberAnimation on opacity {
|
||||
id: opacityAnim
|
||||
duration: 300
|
||||
duration: MobileShell.MobileShellSettings.animationsEnabled ? 300 : 0
|
||||
running: false
|
||||
}
|
||||
|
||||
NumberAnimation on zoomScale {
|
||||
id: scaleAnim
|
||||
duration: 600
|
||||
duration: MobileShell.MobileShellSettings.animationsEnabled ? 600 : 0
|
||||
running: false
|
||||
easing.type: Easing.OutExpo
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue