diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 19:38:21 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 19:38:21 +0800 |
| commit | 9d4d91cf000ff524f69e10d72b784fd2d53811fd (patch) | |
| tree | 82996c1eff4f23284401a017a69440fdb5c15b8d /bar/ActiveWindow.qml | |
| parent | 4c0b839d991046a278fbb20aaf3eb3750016e5f7 (diff) | |
activewindow: move rect bg outside to bar
Diffstat (limited to 'bar/ActiveWindow.qml')
| -rw-r--r-- | bar/ActiveWindow.qml | 48 |
1 files changed, 22 insertions, 26 deletions
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 } } } |
