From b520eb490c7b99659bdb685995e5ad4a3507cbb3 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 13 Jul 2025 17:16:14 +0800 Subject: workspace more fix + activewindow] --- bar/ActiveWindow.qml | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'bar/ActiveWindow.qml') diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml index 25e87e2..915ee25 100644 --- a/bar/ActiveWindow.qml +++ b/bar/ActiveWindow.qml @@ -11,22 +11,34 @@ Item { property var toplevel: ToplevelManager.activeToplevel property var icon: Quickshell.iconPath(AppSearch.guessIcon(toplevel?.appId), "image-missing") - RowLayout { + Rectangle { + // use IRect + implicitWidth: rowLayout.implicitWidth + General.rectMargin * 2 + implicitHeight: rowLayout.implicitHeight + General.rectMargin * 2 anchors.centerIn: parent - spacing: Bar.resourceIconTextSpacing + color: Colors.alt + radius: Style.rounding.smaller - 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 - text: root.toplevel?.title + 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 + } } } } -- cgit v1.2.3