diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 11:04:03 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 11:04:03 +1000 |
| commit | 9071de0d601e588b6840b10d84edd6edc60c5a64 (patch) | |
| tree | 8f1c663d083fc72281df94c464ff54ab2074a83b /modules | |
| parent | feat: border + colour changes (diff) | |
| download | caelestia-shell-9071de0d601e588b6840b10d84edd6edc60c5a64.tar.gz caelestia-shell-9071de0d601e588b6840b10d84edd6edc60c5a64.tar.bz2 caelestia-shell-9071de0d601e588b6840b10d84edd6edc60c5a64.zip | |
feat: shadow
Border exclusivity
Fix slider handle text colour
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/background/Border.qml | 116 | ||||
| -rw-r--r-- | modules/launcher/Launcher.qml | 7 | ||||
| -rw-r--r-- | modules/osd/Osd.qml | 7 |
3 files changed, 91 insertions, 39 deletions
diff --git a/modules/background/Border.qml b/modules/background/Border.qml index 752a814..a11c565 100644 --- a/modules/background/Border.qml +++ b/modules/background/Border.qml @@ -4,54 +4,96 @@ import Quickshell import QtQuick import QtQuick.Effects -StyledWindow { - id: win +Scope { + id: root - name: "border" - exclusionMode: ExclusionMode.Ignore + required property ShellScreen screen - mask: Region { - x: BackgroundConfig.border.thickness - y: BackgroundConfig.border.thickness - width: win.screen.width - BackgroundConfig.border.thickness * 2 - height: win.screen.height - BackgroundConfig.border.thickness * 2 - intersection: Intersection.Xor - } + StyledWindow { + id: win - anchors.top: true - anchors.bottom: true - anchors.left: true - anchors.right: true + screen: root.screen + name: "border" + exclusionMode: ExclusionMode.Ignore - StyledRect { - id: rect + mask: Region { + x: BackgroundConfig.border.thickness + y: BackgroundConfig.border.thickness + width: win.screen.width - BackgroundConfig.border.thickness * 2 + height: win.screen.height - BackgroundConfig.border.thickness * 2 + intersection: Intersection.Xor + } - anchors.fill: parent - color: Appearance.alpha(Appearance.colours.m3surface, false) - visible: false - } + anchors.top: true + anchors.bottom: true + anchors.left: true + anchors.right: true - Item { - id: mask + StyledRect { + id: rect + + anchors.fill: parent + color: Appearance.alpha(Appearance.colours.m3surface, false) + visible: false + } + + Item { + id: mask + + anchors.fill: parent + layer.enabled: true + visible: false + + Rectangle { + anchors.fill: parent + anchors.margins: BackgroundConfig.border.thickness + radius: BackgroundConfig.border.rounding + } + } - anchors.fill: parent - layer.enabled: true - visible: false + MultiEffect { + id: effect - Rectangle { + visible: false anchors.fill: parent - anchors.margins: BackgroundConfig.border.thickness - radius: BackgroundConfig.border.rounding + maskEnabled: true + maskInverted: true + maskSource: mask + source: rect + maskThresholdMin: 0.5 + maskSpreadAtMin: 1 } + + LayerShadow { + source: effect + } + } + + ExclusionZone { + anchors.left: false + } + + ExclusionZone { + anchors.top: false } - MultiEffect { - anchors.fill: parent - maskEnabled: true - maskInverted: true - maskSource: mask - source: rect - maskThresholdMin: 0.5 - maskSpreadAtMin: 1 + ExclusionZone { + anchors.right: false + } + + ExclusionZone { + anchors.bottom: false + } + + component ExclusionZone: StyledWindow { + screen: root.screen + name: "border-exclusion" + width: BackgroundConfig.border.thickness + height: BackgroundConfig.border.thickness + + anchors.top: true + anchors.left: true + anchors.bottom: true + anchors.right: true } } diff --git a/modules/launcher/Launcher.qml b/modules/launcher/Launcher.qml index 26549f5..e0b002b 100644 --- a/modules/launcher/Launcher.qml +++ b/modules/launcher/Launcher.qml @@ -25,7 +25,6 @@ Scope { item: wrapper } - margins.bottom: BackgroundConfig.border.thickness anchors.top: true anchors.left: true anchors.bottom: true @@ -34,6 +33,8 @@ Scope { Background { id: bg + visible: false + anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom @@ -41,6 +42,10 @@ Scope { realWrapperHeight: Math.min(wrapper.height, content.height) } + LayerShadow { + source: bg + } + Wrapper { id: wrapper diff --git a/modules/osd/Osd.qml b/modules/osd/Osd.qml index d173a44..009eb2f 100644 --- a/modules/osd/Osd.qml +++ b/modules/osd/Osd.qml @@ -64,7 +64,6 @@ Variants { item: wrapper } - margins.right: BackgroundConfig.border.thickness anchors.left: true anchors.right: true height: wrapper.height @@ -72,6 +71,8 @@ Variants { Background { id: bg + visible: false + anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right @@ -79,6 +80,10 @@ Variants { realWrapperWidth: Math.min(wrapper.width, content.width) } + LayerShadow { + source: bg + } + Wrapper { id: wrapper |