diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-04 17:01:36 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-04 17:01:36 +1000 |
| commit | 2ffaf4eb3cce40584568f8f01b70f5d092d5dd93 (patch) | |
| tree | 94fdb183bcb1350062ea4e8b58dd74150ca1eac0 /modules/bar/Content.qml | |
| parent | bar: better active window popout (diff) | |
| download | caelestia-shell-2ffaf4eb3cce40584568f8f01b70f5d092d5dd93.tar.gz caelestia-shell-2ffaf4eb3cce40584568f8f01b70f5d092d5dd93.tar.bz2 caelestia-shell-2ffaf4eb3cce40584568f8f01b70f5d092d5dd93.zip | |
feat: bar battery popout
Diffstat (limited to 'modules/bar/Content.qml')
| -rw-r--r-- | modules/bar/Content.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/bar/Content.qml b/modules/bar/Content.qml index f469a3f..1032050 100644 --- a/modules/bar/Content.qml +++ b/modules/bar/Content.qml @@ -14,10 +14,16 @@ StyledRect { function checkPopout(y: real): var { const aw = activeWindow.child; const awy = activeWindow.y + aw.y; + const b = statusIconsInner.battery; + const by = statusIcons.y + statusIconsInner.y + b.y; if (y >= awy && y <= awy + aw.implicitHeight) { Popouts.currentName = "activewindow"; Popouts.currentCenter = Qt.binding(() => activeWindow.y + aw.y + aw.implicitHeight / 2); Popouts.hasCurrent = true; + } else if (y >= by && y <= by + b.implicitHeight) { + Popouts.currentName = "battery"; + Popouts.currentCenter = Qt.binding(() => statusIcons.y + statusIconsInner.y + b.y + b.implicitHeight / 2); + Popouts.hasCurrent = true; } else { Popouts.hasCurrent = false; } |