mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 15:52:58 -04:00
animations: fine-grained anim settings for modals and popouts
This commit is contained in:
@@ -154,6 +154,10 @@ Singleton {
|
||||
property bool nightModeEnabled: false
|
||||
property int animationSpeed: SettingsData.AnimationSpeed.Short
|
||||
property int customAnimationDuration: 500
|
||||
property int popoutAnimationSpeed: SettingsData.AnimationSpeed.Short
|
||||
property int popoutCustomAnimationDuration: 150
|
||||
property int modalAnimationSpeed: SettingsData.AnimationSpeed.Short
|
||||
property int modalCustomAnimationDuration: 150
|
||||
property string wallpaperFillMode: "Fill"
|
||||
property bool blurredWallpaperLayer: false
|
||||
property bool blurWallpaperOnOverview: false
|
||||
|
||||
@@ -766,6 +766,24 @@ Singleton {
|
||||
};
|
||||
}
|
||||
|
||||
readonly property int popoutAnimationDuration: {
|
||||
if (typeof SettingsData === "undefined")
|
||||
return 150;
|
||||
const presetMap = [0, 150, 300, 500];
|
||||
if (SettingsData.popoutAnimationSpeed === SettingsData.AnimationSpeed.Custom)
|
||||
return SettingsData.popoutCustomAnimationDuration;
|
||||
return presetMap[SettingsData.popoutAnimationSpeed] ?? 150;
|
||||
}
|
||||
|
||||
readonly property int modalAnimationDuration: {
|
||||
if (typeof SettingsData === "undefined")
|
||||
return 150;
|
||||
const presetMap = [0, 150, 300, 500];
|
||||
if (SettingsData.modalAnimationSpeed === SettingsData.AnimationSpeed.Custom)
|
||||
return SettingsData.modalCustomAnimationDuration;
|
||||
return presetMap[SettingsData.modalAnimationSpeed] ?? 150;
|
||||
}
|
||||
|
||||
property real cornerRadius: {
|
||||
if (typeof SessionData !== "undefined" && SessionData.isGreeterMode && typeof GreetdSettings !== "undefined") {
|
||||
return GreetdSettings.cornerRadius;
|
||||
|
||||
@@ -40,6 +40,10 @@ var SPEC = {
|
||||
nightModeEnabled: { def: false },
|
||||
animationSpeed: { def: 1 },
|
||||
customAnimationDuration: { def: 500 },
|
||||
popoutAnimationSpeed: { def: 1 },
|
||||
popoutCustomAnimationDuration: { def: 150 },
|
||||
modalAnimationSpeed: { def: 1 },
|
||||
modalCustomAnimationDuration: { def: 150 },
|
||||
wallpaperFillMode: { def: "Fill" },
|
||||
blurredWallpaperLayer: { def: false },
|
||||
blurWallpaperOnOverview: { def: false },
|
||||
|
||||
Reference in New Issue
Block a user