mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 09:12:08 -04:00
theme: Continue to iterate m3 specs
This commit is contained in:
@@ -674,16 +674,55 @@ Singleton {
|
||||
property color shadowStrong: Qt.rgba(0, 0, 0, 0.3)
|
||||
|
||||
readonly property bool elevationEnabled: typeof SettingsData !== "undefined" && (SettingsData.m3ElevationEnabled ?? true)
|
||||
readonly property real elevationBlurMax: 64
|
||||
readonly property var elevationLevel1: ({ blurPx: 4, offsetY: 1, spreadPx: 0, alpha: 0.2 })
|
||||
readonly property var elevationLevel2: ({ blurPx: 8, offsetY: 4, spreadPx: 0, alpha: 0.25 })
|
||||
readonly property var elevationLevel3: ({ blurPx: 12, offsetY: 6, spreadPx: 0, alpha: 0.3 })
|
||||
readonly property var elevationLevel4: ({ blurPx: 16, offsetY: 8, spreadPx: 0, alpha: 0.3 })
|
||||
readonly property var elevationLevel5: ({ blurPx: 20, offsetY: 10, spreadPx: 0, alpha: 0.3 })
|
||||
readonly property real elevationBlurMax: 16
|
||||
readonly property var elevationLevel1: ({
|
||||
blurPx: 4,
|
||||
offsetY: 1,
|
||||
spreadPx: 0,
|
||||
alpha: 0.2
|
||||
})
|
||||
readonly property var elevationLevel2: ({
|
||||
blurPx: 8,
|
||||
offsetY: 4,
|
||||
spreadPx: 0,
|
||||
alpha: 0.25
|
||||
})
|
||||
readonly property var elevationLevel3: ({
|
||||
blurPx: 12,
|
||||
offsetY: 6,
|
||||
spreadPx: 0,
|
||||
alpha: 0.3
|
||||
})
|
||||
readonly property var elevationLevel4: ({
|
||||
blurPx: 16,
|
||||
offsetY: 8,
|
||||
spreadPx: 0,
|
||||
alpha: 0.3
|
||||
})
|
||||
readonly property var elevationLevel5: ({
|
||||
blurPx: 20,
|
||||
offsetY: 10,
|
||||
spreadPx: 0,
|
||||
alpha: 0.3
|
||||
})
|
||||
function elevationShadowColor(level) {
|
||||
const alpha = (level && level.alpha !== undefined) ? level.alpha : 0.3;
|
||||
const baseColor = isLightMode ? Qt.rgba(0, 0, 0, 1) : surfaceContainerHighest;
|
||||
return Theme.withAlpha(baseColor, alpha * (typeof SettingsData !== "undefined" ? SettingsData.popupTransparency : 1));
|
||||
return Qt.rgba(0, 0, 0, alpha);
|
||||
}
|
||||
function elevationTintOpacity(level) {
|
||||
if (!level)
|
||||
return 0;
|
||||
if (level === elevationLevel1)
|
||||
return 0.05;
|
||||
if (level === elevationLevel2)
|
||||
return 0.08;
|
||||
if (level === elevationLevel3)
|
||||
return 0.11;
|
||||
if (level === elevationLevel4)
|
||||
return 0.12;
|
||||
if (level === elevationLevel5)
|
||||
return 0.14;
|
||||
return 0.08;
|
||||
}
|
||||
|
||||
readonly property var animationDurations: [
|
||||
|
||||
Reference in New Issue
Block a user