From 3710df29f588c2aa430d9797a36afa1cbd85b128 Mon Sep 17 00:00:00 2001 From: Laurens Duin <85798751+Laurens256@users.noreply.github.com> Date: Wed, 13 Aug 2025 06:31:48 +0200 Subject: bar: allow hiding items and reordering (#379) * feat: reorder bar, no popout yet * chore: cleanup * refactor: use DelegateChooser * feat: popouts * chore: cleanup * better popout check + fix async stuff + bar interaction + a bunch of other fixes * fix activewindow and bar vertical padding * readme: add config opt * bar: fix top/bottom padding * bar: better wheel behaviour --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> --- modules/bar/BarWrapper.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/bar/BarWrapper.qml') diff --git a/modules/bar/BarWrapper.qml b/modules/bar/BarWrapper.qml index 7752446..88c3892 100644 --- a/modules/bar/BarWrapper.qml +++ b/modules/bar/BarWrapper.qml @@ -14,19 +14,24 @@ Item { required property BarPopouts.Wrapper popouts readonly property int exclusiveZone: Config.bar.persistent || visibilities.bar ? content.implicitWidth : Config.border.thickness + readonly property bool shouldBeVisible: Config.bar.persistent || visibilities.bar || isHovered property bool isHovered function checkPopout(y: real): void { content.item?.checkPopout(y); } + function handleWheel(y: real, angleDelta: point): void { + content.item?.handleWheel(y, angleDelta); + } + visible: width > Config.border.thickness implicitWidth: Config.border.thickness implicitHeight: content.implicitHeight states: State { name: "visible" - when: Config.bar.persistent || root.visibilities.bar || root.isHovered + when: root.shouldBeVisible PropertyChanges { root.implicitWidth: content.implicitWidth @@ -63,7 +68,7 @@ Item { Loader { id: content - Component.onCompleted: active = Qt.binding(() => Config.bar.persistent || root.visibilities.bar || root.isHovered || root.visible) + Component.onCompleted: active = Qt.binding(() => root.shouldBeVisible || root.visible) anchors.top: parent.top anchors.bottom: parent.bottom -- cgit v1.2.3-freya