summaryrefslogtreecommitdiff
path: root/modules/bar/BarWrapper.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bar/BarWrapper.qml')
-rw-r--r--modules/bar/BarWrapper.qml13
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