summaryrefslogtreecommitdiff
path: root/modules/bar/components/ActiveWindow.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-24 13:31:36 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-24 13:31:36 +0800
commit01b38be6afbe660e3b9f9e136870a76afb69bf31 (patch)
treea18c46b9d8fb0261addeadb89ca2a8ebd22f0ccc /modules/bar/components/ActiveWindow.qml
parentdashboard: default weather (diff)
downloadcaelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.tar.gz
caelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.tar.bz2
caelestia-shell-01b38be6afbe660e3b9f9e136870a76afb69bf31.zip
internal: fix binding loops
Diffstat (limited to 'modules/bar/components/ActiveWindow.qml')
-rw-r--r--modules/bar/components/ActiveWindow.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml
index 75dfc43..b2b9572 100644
--- a/modules/bar/components/ActiveWindow.qml
+++ b/modules/bar/components/ActiveWindow.qml
@@ -15,12 +15,16 @@ Item {
implicitWidth: child.implicitWidth
implicitHeight: child.implicitHeight
- StyledRect {
+ Item {
id: child
+ readonly property bool vertical: root.vertical
+
anchors.centerIn: parent
clip: true
+ implicitWidth: root.vertical ? Math.max(icon.implicitWidth, text.implicitHeight) : icon.implicitWidth + text.implicitWidth + text.anchors.leftMargin
+ implicitHeight: root.vertical ? icon.implicitHeight + text.implicitWidth + text.anchors.topMargin : Math.max(icon.implicitHeight, text.implicitheight)
MaterialIcon {
id: icon