diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 11:39:32 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-05 11:39:32 +1000 |
| commit | 34e8c4fb8754f6a5f1dbe3350593a0ded4274bb6 (patch) | |
| tree | 05ddaa3a81a5be54c924e2b9dfb0eaa8255393e6 | |
| parent | hyprland: fix read errors (diff) | |
| download | caelestia-shell-34e8c4fb8754f6a5f1dbe3350593a0ded4274bb6.tar.gz caelestia-shell-34e8c4fb8754f6a5f1dbe3350593a0ded4274bb6.tar.bz2 caelestia-shell-34e8c4fb8754f6a5f1dbe3350593a0ded4274bb6.zip | |
feat: bar shadow
| -rw-r--r-- | config/BarConfig.qml | 4 | ||||
| -rw-r--r-- | modules/background/Background.qml | 3 | ||||
| -rw-r--r-- | modules/bar/Bar.qml | 29 |
3 files changed, 23 insertions, 13 deletions
diff --git a/config/BarConfig.qml b/config/BarConfig.qml index 345aac9..727c376 100644 --- a/config/BarConfig.qml +++ b/config/BarConfig.qml @@ -16,6 +16,7 @@ Singleton { readonly property Presets presets: Presets {} component Sizes: QtObject { + property int exclusiveZone: totalHeight property int totalHeight: height property int height: 40 property int innerHeight: 30 @@ -51,7 +52,8 @@ Singleton { readonly property Preset pills: Preset { name: "pills" sizes: Sizes { - totalHeight: height + floatingGap + totalHeight: height + floatingGap * 2 + exclusiveZone: totalHeight - floatingGap } } readonly property Preset panel: Preset { diff --git a/modules/background/Background.qml b/modules/background/Background.qml index edd7613..7a46c72 100644 --- a/modules/background/Background.qml +++ b/modules/background/Background.qml @@ -1,9 +1,6 @@ import "root:/widgets" -import "root:/config" import Quickshell import Quickshell.Wayland -import QtQuick -import QtQuick.Effects Variants { model: Quickshell.screens diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 658ef87..f85d0b2 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -14,6 +14,7 @@ Variants { screen: modelData name: "bar" + exclusiveZone: BarConfig.sizes.exclusiveZone width: BarConfig.vertical ? BarConfig.sizes.totalHeight : -1 height: BarConfig.vertical ? -1 : BarConfig.sizes.totalHeight @@ -43,19 +44,29 @@ Variants { } } - Preset { - presetName: "pills" - sourceComponent: Pills { - screen: win.modelData + Item { + id: content + + anchors.fill: parent + + Preset { + presetName: "pills" + sourceComponent: Pills { + screen: win.modelData + } } - } - Preset { - presetName: "panel" - sourceComponent: Panel { - screen: win.modelData + Preset { + presetName: "panel" + sourceComponent: Panel { + screen: win.modelData + } } } + + LayerShadow { + source: content + } } component Preset: Loader { |