mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-05 05:12:05 -04:00
theme: Continue to iterate m3 specs
This commit is contained in:
@@ -814,12 +814,11 @@ Item {
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
shadowEnabled: Theme.elevationEnabled
|
||||
shadowHorizontalOffset: 0
|
||||
shadowVerticalOffset: 4
|
||||
shadowBlur: 0.8
|
||||
shadowColor: Qt.rgba(0, 0, 0, 0.2)
|
||||
shadowOpacity: 0.2
|
||||
shadowColor: Theme.elevationShadowColor(Theme.elevationLevel2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -836,12 +835,11 @@ Item {
|
||||
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
shadowEnabled: true
|
||||
shadowEnabled: Theme.elevationEnabled
|
||||
shadowHorizontalOffset: 0
|
||||
shadowVerticalOffset: 4
|
||||
shadowBlur: 0.8
|
||||
shadowColor: Qt.rgba(0, 0, 0, 0.2)
|
||||
shadowOpacity: 0.2
|
||||
shadowColor: Theme.elevationShadowColor(Theme.elevationLevel2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import qs.Common
|
||||
import qs.Services
|
||||
@@ -32,6 +33,20 @@ Rectangle {
|
||||
radius: Theme.cornerRadius
|
||||
clip: true
|
||||
|
||||
layer.enabled: Theme.elevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1"
|
||||
layer.smooth: false
|
||||
layer.effect: MultiEffect {
|
||||
autoPaddingEnabled: true
|
||||
shadowEnabled: Theme.elevationEnabled
|
||||
blurEnabled: false
|
||||
maskEnabled: false
|
||||
shadowBlur: Math.max(0, Math.min(1, Theme.elevationLevel1.blurPx / Theme.elevationBlurMax))
|
||||
shadowScale: 1
|
||||
shadowVerticalOffset: Theme.elevationLevel1.offsetY
|
||||
shadowHorizontalOffset: 0
|
||||
shadowColor: Theme.elevationShadowColor(Theme.elevationLevel1)
|
||||
}
|
||||
|
||||
color: {
|
||||
if (isSelected && keyboardNavigationActive)
|
||||
return Theme.primaryPressed;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Services.Notifications
|
||||
import qs.Common
|
||||
@@ -99,6 +100,20 @@ Rectangle {
|
||||
}
|
||||
clip: true
|
||||
|
||||
layer.enabled: Theme.elevationEnabled && Quickshell.env("DMS_DISABLE_LAYER") !== "true" && Quickshell.env("DMS_DISABLE_LAYER") !== "1"
|
||||
layer.smooth: false
|
||||
layer.effect: MultiEffect {
|
||||
autoPaddingEnabled: true
|
||||
shadowEnabled: Theme.elevationEnabled
|
||||
blurEnabled: false
|
||||
maskEnabled: false
|
||||
shadowBlur: Math.max(0, Math.min(1, Theme.elevationLevel1.blurPx / Theme.elevationBlurMax))
|
||||
shadowScale: 1
|
||||
shadowVerticalOffset: Theme.elevationLevel1.offsetY
|
||||
shadowHorizontalOffset: 0
|
||||
shadowColor: Theme.elevationShadowColor(Theme.elevationLevel1)
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: cardHoverHandler
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ PanelWindow {
|
||||
layer.textureSize: Qt.size(Math.round(width * win.dpr), Math.round(height * win.dpr))
|
||||
layer.textureMirroring: ShaderEffectSource.MirrorVertically
|
||||
|
||||
readonly property int blurMax: 64
|
||||
readonly property int blurMax: Theme.elevationBlurMax
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
id: shadowFx
|
||||
@@ -391,6 +391,13 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: shadowShapeSource.radius
|
||||
color: Theme.surfaceTint
|
||||
opacity: Theme.elevationEnabled ? Theme.elevationTintOpacity(content.elevLevel) : 0
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
|
||||
@@ -1602,6 +1602,28 @@ Item {
|
||||
checked: SettingsData.m3ElevationEnabled ?? true
|
||||
onToggled: checked => SettingsData.set("m3ElevationEnabled", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tab: "theme"
|
||||
tags: ["elevation", "shadow", "modal", "dialog", "m3"]
|
||||
settingKey: "modalElevationEnabled"
|
||||
text: I18n.tr("Modal Shadows")
|
||||
description: I18n.tr("Shadow elevation on modals and dialogs")
|
||||
checked: SettingsData.modalElevationEnabled ?? true
|
||||
visible: SettingsData.m3ElevationEnabled ?? true
|
||||
onToggled: checked => SettingsData.set("modalElevationEnabled", checked)
|
||||
}
|
||||
|
||||
SettingsToggleRow {
|
||||
tab: "theme"
|
||||
tags: ["elevation", "shadow", "popout", "popup", "osd", "dropdown", "m3"]
|
||||
settingKey: "popoutElevationEnabled"
|
||||
text: I18n.tr("Popout Shadows")
|
||||
description: I18n.tr("Shadow elevation on popouts, OSDs, and dropdowns")
|
||||
checked: SettingsData.popoutElevationEnabled ?? true
|
||||
visible: SettingsData.m3ElevationEnabled ?? true
|
||||
onToggled: checked => SettingsData.set("popoutElevationEnabled", checked)
|
||||
}
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
|
||||
Reference in New Issue
Block a user