diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-15 21:49:09 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-15 21:49:09 +1000 |
| commit | 2be46ff65ab50026e831c42b25c1a4f86eb413c4 (patch) | |
| tree | 03853df4c5bbb5d948dd01f4f8a627504b1a918b /modules/bar/BarWrapper.qml | |
| parent | lock/notifs: retain notifs (diff) | |
| download | caelestia-shell-2be46ff65ab50026e831c42b25c1a4f86eb413c4.tar.gz caelestia-shell-2be46ff65ab50026e831c42b25c1a4f86eb413c4.tar.bz2 caelestia-shell-2be46ff65ab50026e831c42b25c1a4f86eb413c4.zip | |
internal: static bar width
Diffstat (limited to 'modules/bar/BarWrapper.qml')
| -rw-r--r-- | modules/bar/BarWrapper.qml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/modules/bar/BarWrapper.qml b/modules/bar/BarWrapper.qml index cd414bb..83ff1c3 100644 --- a/modules/bar/BarWrapper.qml +++ b/modules/bar/BarWrapper.qml @@ -12,7 +12,9 @@ Item { required property PersistentProperties visibilities required property BarPopouts.Wrapper popouts - readonly property int exclusiveZone: Config.bar.persistent || visibilities.bar ? content.implicitWidth : Config.border.thickness + readonly property int padding: Math.max(Appearance.padding.smaller, Config.border.thickness) + readonly property int contentWidth: Config.bar.sizes.innerWidth + padding * 2 + readonly property int exclusiveZone: Config.bar.persistent || visibilities.bar ? contentWidth : Config.border.thickness readonly property bool shouldBeVisible: Config.bar.persistent || visibilities.bar || isHovered property bool isHovered @@ -26,14 +28,13 @@ Item { visible: width > Config.border.thickness implicitWidth: Config.border.thickness - implicitHeight: content.implicitHeight states: State { name: "visible" when: root.shouldBeVisible PropertyChanges { - root.implicitWidth: content.implicitWidth + root.implicitWidth: root.contentWidth } } @@ -67,13 +68,15 @@ Item { Loader { id: content - Component.onCompleted: active = Qt.binding(() => root.shouldBeVisible || root.visible) - anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: parent.right + active: root.shouldBeVisible || root.visible + asynchronous: true + sourceComponent: Bar { + width: root.contentWidth screen: root.screen visibilities: root.visibilities popouts: root.popouts |