From 51f08ae20f4a5bb2c7114c327eabe79358e4304c Mon Sep 17 00:00:00 2001 From: lucy Date: Thu, 14 May 2026 16:27:19 +0200 Subject: [PATCH] force active window size --- modules/bar/ActiveWindow.qml | 4 ++-- modules/bar/Bar.qml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/bar/ActiveWindow.qml b/modules/bar/ActiveWindow.qml index 3bb588a..5cd6116 100644 --- a/modules/bar/ActiveWindow.qml +++ b/modules/bar/ActiveWindow.qml @@ -9,14 +9,14 @@ ClippingWrapperRectangle { clip: true color: Colors.base01 required property int barHeight - readonly property double vertMargin: barHeight / 4 - 4 + required property double vertMargin topMargin: vertMargin bottomMargin: vertMargin leftMargin: 8 rightMargin: 8 child: StyledText { text: Hyprland.activeToplevel?.title ?? "Desktop" - width: Math.min(implicitWidth, 50) + width: root.width - root.leftMargin - root.rightMargin elide: Text.ElideRight } } diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 2c72f86..a228005 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -28,7 +28,11 @@ Variants { barHeight: root.implicitHeight } ActiveWindow { + vertMargin: barHeight / 4 - 4 barHeight: root.implicitHeight + Layout.maximumWidth: 300 + Layout.maximumHeight: barHeight - (barHeight / 4 + 2) + Layout.fillWidth: false } } RowLayout {