From 9d4d91cf000ff524f69e10d72b784fd2d53811fd Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 13 Jul 2025 19:38:21 +0800 Subject: activewindow: move rect bg outside to bar --- bar/ActiveWindow.qml | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'bar/ActiveWindow.qml') diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml index bc5ce04..70c9783 100644 --- a/bar/ActiveWindow.qml +++ b/bar/ActiveWindow.qml @@ -11,34 +11,30 @@ Item { property var toplevel: Hyprland.activeToplevel property var icon: Quickshell.iconPath(AppSearch.guessIcon(toplevel?.wayland.appId), "image-missing") - Rectangle { - // use IRect - implicitWidth: rowLayout.implicitWidth + General.rectMargin * 2 - implicitHeight: rowLayout.implicitHeight + General.rectMargin * 2 - anchors.centerIn: parent - color: Colors.alt - radius: Style.rounding.smaller + // use IRect + implicitWidth: rowLayout.implicitWidth + General.rectMargin * 2 + implicitHeight: rowLayout.implicitHeight + General.rectMargin * 2 + anchors.centerIn: parent - RowLayout { - id: rowLayout - anchors.centerIn: parent - spacing: Bar.resourceIconTextSpacing + RowLayout { + id: rowLayout + anchors.centerIn: parent + spacing: Bar.resourceIconTextSpacing - anchors.verticalCenter: parent.verticalCenter - IconImage { - source: root.icon - implicitWidth: Bar.appIconSize - implicitHeight: Bar.appIconSize - Layout.fillHeight: true - Layout.fillWidth: false - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - } - Text { - // TOOD: if not exist, use lazyloader or something hide this - // TODO: use IText - font.pixelSize: General.fontSize - text: root.toplevel?.title - } + anchors.verticalCenter: parent.verticalCenter + IconImage { + source: root.icon + implicitWidth: Bar.appIconSize + implicitHeight: Bar.appIconSize + Layout.fillHeight: true + Layout.fillWidth: false + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter + } + Text { + // TOOD: if not exist, use lazyloader or something hide this + // TODO: use IText + font.pixelSize: General.fontSize + text: root.toplevel?.title } } } -- cgit v1.2.3