summaryrefslogtreecommitdiff
path: root/modules/bar/BarWrapper.qml
diff options
context:
space:
mode:
authorLaurens Duin <85798751+Laurens256@users.noreply.github.com>2025-08-13 06:31:48 +0200
committerGitHub <noreply@github.com>2025-08-13 14:31:48 +1000
commit3710df29f588c2aa430d9797a36afa1cbd85b128 (patch)
tree5f804118369ab2db0dbffbbd604b4ddc33af93ed /modules/bar/BarWrapper.qml
parentnix: add home manager module (#402) (diff)
downloadcaelestia-shell-3710df29f588c2aa430d9797a36afa1cbd85b128.tar.gz
caelestia-shell-3710df29f588c2aa430d9797a36afa1cbd85b128.tar.bz2
caelestia-shell-3710df29f588c2aa430d9797a36afa1cbd85b128.zip
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>
Diffstat (limited to 'modules/bar/BarWrapper.qml')
-rw-r--r--modules/bar/BarWrapper.qml9
1 files changed, 7 insertions, 2 deletions
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