mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(launcher): use readonly prop to check if animations are enabled
This commit is contained in:
@@ -72,6 +72,8 @@ Item {
|
||||
property bool cachedAnimateFromBottom: false
|
||||
property bool cachedAnimateFromLeft: false
|
||||
property bool cachedAnimateFromRight: false
|
||||
|
||||
readonly property bool animationsDisabled: Settings.data.general.animationDisabled
|
||||
property bool cachedShouldAnimateWidth: false
|
||||
property bool cachedShouldAnimateHeight: false
|
||||
|
||||
@@ -1313,7 +1315,7 @@ Item {
|
||||
// Make panel visible, now only the intended dimension will animate
|
||||
root.isPanelVisible = true;
|
||||
|
||||
if (Style.animationNormal === 0) {
|
||||
if (root.animationsDisabled) {
|
||||
// Skip delay when animations are disabled
|
||||
root.sizeAnimationComplete = true;
|
||||
} else {
|
||||
|
||||
@@ -47,7 +47,7 @@ Rectangle {
|
||||
|
||||
Timer {
|
||||
id: mouseTrackingDelayTimer
|
||||
interval: Style.animationNormal === 0 ? 0 : (Style.animationNormal + 50) // Wait for panel animation to complete + safety margin
|
||||
interval: root.animationsDisabled ? 0 : (Style.animationNormal + 50) // Wait for panel animation to complete + safety margin
|
||||
repeat: false
|
||||
onTriggered: {
|
||||
root.mouseTrackingReady = true;
|
||||
@@ -57,6 +57,7 @@ Rectangle {
|
||||
|
||||
readonly property var defaultProvider: appsProvider
|
||||
readonly property var currentProvider: activeProvider || defaultProvider
|
||||
readonly property bool animationsDisabled: Settings.data.general.animationDisabled
|
||||
|
||||
readonly property string launcherDensity: (currentProvider && currentProvider.ignoreDensity === false) ? (Settings.data.appLauncher.density || "default") : "comfortable"
|
||||
readonly property int effectiveIconSize: launcherDensity === "comfortable" ? 48 : (launcherDensity === "default" ? 36 : 24)
|
||||
|
||||
Reference in New Issue
Block a user