1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-03 19:12:11 -04:00

re-organize settings

This commit is contained in:
bbedward
2026-04-30 15:19:06 -04:00
committed by purian23
parent 01da451f53
commit 7138c546e1
13 changed files with 240 additions and 298 deletions

View File

@@ -55,7 +55,7 @@ Singleton {
readonly property bool isDirectionalEffect: isConnectedEffect || _effect === 1
readonly property bool isDepthEffect: _effect === 2
readonly property bool isConnectedEffect: (typeof SettingsData !== "undefined") && SettingsData.frameEnabled && _effect === 1 && SettingsData.directionalAnimationMode === 3
readonly property bool isConnectedEffect: (typeof SettingsData !== "undefined") && SettingsData.connectedFrameModeActive
readonly property real effectScaleCollapsed: _effectScaleCollapsed[_effect] !== undefined ? _effectScaleCollapsed[_effect] : 0.96
readonly property real effectAnimOffset: _effectAnimOffsets[_effect] !== undefined ? _effectAnimOffsets[_effect] : 16

View File

@@ -185,15 +185,6 @@ Singleton {
onAnimationVariantChanged: saveSettings()
property int motionEffect: SettingsData.AnimationEffect.Standard
onMotionEffectChanged: saveSettings()
property int directionalAnimationMode: 1
onDirectionalAnimationModeChanged: {
const normalized = directionalAnimationMode === 3 ? 3 : 1;
if (directionalAnimationMode !== normalized) {
directionalAnimationMode = normalized;
return;
}
saveSettings();
}
property bool m3ElevationEnabled: true
onM3ElevationEnabledChanged: saveSettings()
property int m3ElevationIntensity: 12
@@ -252,17 +243,11 @@ Singleton {
property string frameLauncherEmergeSide: "bottom"
onFrameLauncherEmergeSideChanged: saveSettings()
readonly property string frameModalEmergeSide: frameLauncherEmergeSide === "top" ? "bottom" : "top"
property int previousDirectionalMode: 1
onPreviousDirectionalModeChanged: {
if (previousDirectionalMode !== 1) {
previousDirectionalMode = 1;
return;
}
saveSettings();
}
property string frameMode: "separate"
onFrameModeChanged: saveSettings()
property var connectedFrameBarStyleBackups: ({})
onConnectedFrameBarStyleBackupsChanged: saveSettings()
readonly property bool connectedFrameModeActive: frameEnabled && motionEffect === SettingsData.AnimationEffect.Directional && directionalAnimationMode === 3
readonly property bool connectedFrameModeActive: frameEnabled && frameMode === "connected"
onConnectedFrameModeActiveChanged: {
if (_loading)
return;
@@ -1353,6 +1338,9 @@ Singleton {
Store.parse(root, obj);
if (obj?.directionalAnimationMode === 3 && frameMode !== "connected")
frameMode = "connected";
if (obj?.weatherLocation !== undefined)
_legacyWeatherLocation = obj.weatherLocation;
if (obj?.weatherCoordinates !== undefined)

View File

@@ -51,8 +51,6 @@ var SPEC = {
enableRippleEffects: { def: true },
animationVariant: { def: 0 },
motionEffect: { def: 0 },
directionalAnimationMode: { def: 1 },
previousDirectionalMode: { def: 1 },
m3ElevationEnabled: { def: true },
m3ElevationIntensity: { def: 12 },
m3ElevationOpacity: { def: 30 },
@@ -566,7 +564,8 @@ var SPEC = {
frameShowOnOverview: { def: false },
frameBlurEnabled: { def: true },
frameCloseGaps: { def: false },
frameLauncherEmergeSide: { def: "bottom" }
frameLauncherEmergeSide: { def: "bottom" },
frameMode: { def: "separate" }
};
function getValidKeys() {