feat: bar shadow

This commit is contained in:
2 * r + 2 * t 2025-05-05 11:39:32 +10:00
parent 0c3899ce80
commit 34e8c4fb87
3 changed files with 23 additions and 13 deletions

View file

@ -16,6 +16,7 @@ Singleton {
readonly property Presets presets: Presets {} readonly property Presets presets: Presets {}
component Sizes: QtObject { component Sizes: QtObject {
property int exclusiveZone: totalHeight
property int totalHeight: height property int totalHeight: height
property int height: 40 property int height: 40
property int innerHeight: 30 property int innerHeight: 30
@ -51,7 +52,8 @@ Singleton {
readonly property Preset pills: Preset { readonly property Preset pills: Preset {
name: "pills" name: "pills"
sizes: Sizes { sizes: Sizes {
totalHeight: height + floatingGap totalHeight: height + floatingGap * 2
exclusiveZone: totalHeight - floatingGap
} }
} }
readonly property Preset panel: Preset { readonly property Preset panel: Preset {

View file

@ -1,9 +1,6 @@
import "root:/widgets" import "root:/widgets"
import "root:/config"
import Quickshell import Quickshell
import Quickshell.Wayland import Quickshell.Wayland
import QtQuick
import QtQuick.Effects
Variants { Variants {
model: Quickshell.screens model: Quickshell.screens

View file

@ -14,6 +14,7 @@ Variants {
screen: modelData screen: modelData
name: "bar" name: "bar"
exclusiveZone: BarConfig.sizes.exclusiveZone
width: BarConfig.vertical ? BarConfig.sizes.totalHeight : -1 width: BarConfig.vertical ? BarConfig.sizes.totalHeight : -1
height: BarConfig.vertical ? -1 : BarConfig.sizes.totalHeight height: BarConfig.vertical ? -1 : BarConfig.sizes.totalHeight
@ -43,18 +44,28 @@ Variants {
} }
} }
Preset { Item {
presetName: "pills" id: content
sourceComponent: Pills {
screen: win.modelData anchors.fill: parent
Preset {
presetName: "pills"
sourceComponent: Pills {
screen: win.modelData
}
}
Preset {
presetName: "panel"
sourceComponent: Panel {
screen: win.modelData
}
} }
} }
Preset { LayerShadow {
presetName: "panel" source: content
sourceComponent: Panel {
screen: win.modelData
}
} }
} }