diff options
| author | Laurens Duin <85798751+Laurens256@users.noreply.github.com> | 2025-08-13 06:31:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-13 14:31:48 +1000 |
| commit | 3710df29f588c2aa430d9797a36afa1cbd85b128 (patch) | |
| tree | 5f804118369ab2db0dbffbbd604b4ddc33af93ed /modules/drawers | |
| parent | nix: add home manager module (#402) (diff) | |
| download | caelestia-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/drawers')
| -rw-r--r-- | modules/drawers/Drawers.qml | 16 | ||||
| -rw-r--r-- | modules/drawers/Interactions.qml | 13 | ||||
| -rw-r--r-- | modules/drawers/Panels.qml | 2 |
3 files changed, 10 insertions, 21 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 26f177c..06183dd 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -133,17 +133,17 @@ Variants { visibilities: visibilities bar: bar } - } - BarWrapper { - id: bar + BarWrapper { + id: bar - anchors.top: parent.top - anchors.bottom: parent.bottom + anchors.top: parent.top + anchors.bottom: parent.bottom - screen: scope.modelData - visibilities: visibilities - popouts: panels.popouts + screen: scope.modelData + visibilities: visibilities + popouts: panels.popouts + } } } } diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml index 6b276a0..94d27cc 100644 --- a/modules/drawers/Interactions.qml +++ b/modules/drawers/Interactions.qml @@ -45,18 +45,7 @@ CustomMouseArea { function onWheel(event: WheelEvent): void { if (event.x < bar.implicitWidth) { - if (event.y < screen.height / 2) { - if (event.angleDelta.y > 0) - Audio.incrementVolume(); - else if (event.angleDelta.y < 0) - Audio.decrementVolume(); - } else { - const monitor = Brightness.getMonitorForScreen(screen); - if (event.angleDelta.y > 0) - monitor.setBrightness(monitor.brightness + 0.1); - else if (event.angleDelta.y < 0) - monitor.setBrightness(monitor.brightness - 0.1); - } + bar.handleWheel(event.y, event.angleDelta); } } diff --git a/modules/drawers/Panels.qml b/modules/drawers/Panels.qml index ae3a9f2..d27dca0 100644 --- a/modules/drawers/Panels.qml +++ b/modules/drawers/Panels.qml @@ -92,7 +92,7 @@ Item { const diff = root.height - Math.floor(off + nonAnimHeight); if (diff < 0) return off + diff; - return off; + return Math.max(off, 0); } } |