mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 00:02:28 -04:00
theme: Continue to iterate m3 specs
This commit is contained in:
@@ -167,6 +167,10 @@ Singleton {
|
||||
onEnableRippleEffectsChanged: saveSettings()
|
||||
property bool m3ElevationEnabled: true
|
||||
onM3ElevationEnabledChanged: saveSettings()
|
||||
property bool modalElevationEnabled: true
|
||||
onModalElevationEnabledChanged: saveSettings()
|
||||
property bool popoutElevationEnabled: true
|
||||
onPopoutElevationEnabledChanged: saveSettings()
|
||||
property string wallpaperFillMode: "Fill"
|
||||
property bool blurredWallpaperLayer: false
|
||||
property bool blurWallpaperOnOverview: false
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -47,6 +47,8 @@ var SPEC = {
|
||||
modalCustomAnimationDuration: { def: 150 },
|
||||
enableRippleEffects: { def: true },
|
||||
m3ElevationEnabled: { def: true },
|
||||
modalElevationEnabled: { def: true },
|
||||
popoutElevationEnabled: { def: true },
|
||||
wallpaperFillMode: { def: "Fill" },
|
||||
blurredWallpaperLayer: { def: false },
|
||||
blurWallpaperOnOverview: { def: false },
|
||||
|
||||
Reference in New Issue
Block a user