diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 10:53:54 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-29 10:53:54 +1000 |
| commit | 01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a (patch) | |
| tree | 23b0bd7eeedcef0cede66b38426d9e8ba1a04af1 /modules/bar | |
| parent | refactor: use anchors instead of layouts (diff) | |
| download | caelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.tar.gz caelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.tar.bz2 caelestia-shell-01d9c318593e1bf4eb81dc6e71dc4c20e8c9fa6a.zip | |
bar: fix alignment
Also refactor box -> styledrect + paddedrect
Diffstat (limited to 'modules/bar')
| -rw-r--r-- | modules/bar/Pills.qml | 2 | ||||
| -rw-r--r-- | modules/bar/components/ActiveWindow.qml | 11 | ||||
| -rw-r--r-- | modules/bar/components/OsIcon.qml | 19 |
3 files changed, 11 insertions, 21 deletions
diff --git a/modules/bar/Pills.qml b/modules/bar/Pills.qml index 5337221..dffd65f 100644 --- a/modules/bar/Pills.qml +++ b/modules/bar/Pills.qml @@ -71,7 +71,7 @@ Item { } } - component Pill: Box { + component Pill: PaddedRect { id: pill color: Appearance.alpha(Appearance.colours.base, false) diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml index 24edb9e..40f7a64 100644 --- a/modules/bar/components/ActiveWindow.qml +++ b/modules/bar/components/ActiveWindow.qml @@ -5,12 +5,11 @@ import "root:/config" import QtQuick import QtQuick.Layouts -Box { +StyledRect { id: root readonly property color colour: Appearance.colours.pink - padding: [Appearance.padding.smaller, 0] animated: true clip: true @@ -21,14 +20,14 @@ Box { color: root.colour } - StyledText { + AnchorText { + prevAnchor: icon + vertical: root.vertical + text: Hyprland.activeClient?.title ?? "Desktop" font.pointSize: Appearance.font.size.smaller font.family: Appearance.font.family.mono color: root.colour rotation: root.vertical ? 90 : 0 - - anchors.left: icon.right - anchors.leftMargin: Appearance.padding.smaller } } diff --git a/modules/bar/components/OsIcon.qml b/modules/bar/components/OsIcon.qml index 5f2a103..0daa945 100644 --- a/modules/bar/components/OsIcon.qml +++ b/modules/bar/components/OsIcon.qml @@ -1,19 +1,10 @@ import "root:/widgets" -import "root:/services" import "root:/utils" import "root:/config" -import QtQuick -import QtQuick.Layouts -Box { - padding: [Appearance.padding.smaller, 0] - - StyledText { - text: Icons.osIcon - font.pointSize: Appearance.font.size.smaller - font.family: Appearance.font.family.mono - color: Appearance.colours.yellow - - Layout.alignment: Layout.Center - } +StyledText { + text: Icons.osIcon + font.pointSize: Appearance.font.size.smaller + font.family: Appearance.font.family.mono + color: Appearance.colours.yellow } |