From 521cd4079ee665dda1881fb6082497d58d654969 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 15 Mar 2026 22:29:28 +1100 Subject: bar/activewindow: allow disable show on hover Closes #1209 Closes #1019 --- modules/bar/Bar.qml | 3 ++- modules/bar/components/ActiveWindow.qml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index cb384e3..95c166e 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -68,7 +68,7 @@ ColumnLayout { popouts.hasCurrent = false; item.expanded = true; } - } else if (id === "activeWindow" && Config.bar.popouts.activeWindow) { + } else if (id === "activeWindow" && Config.bar.popouts.activeWindow && Config.bar.activeWindow.showOnHover) { popouts.currentName = id.toLowerCase(); popouts.currentCenter = item.mapToItem(root, 0, itemHeight / 2).y; popouts.hasCurrent = true; @@ -134,6 +134,7 @@ ColumnLayout { DelegateChoice { roleValue: "activeWindow" delegate: WrappedLoader { + Layout.fillWidth: true sourceComponent: ActiveWindow { bar: root monitor: Brightness.getMonitorForScreen(root.screen) diff --git a/modules/bar/components/ActiveWindow.qml b/modules/bar/components/ActiveWindow.qml index 3eb6904..4881f42 100644 --- a/modules/bar/components/ActiveWindow.qml +++ b/modules/bar/components/ActiveWindow.qml @@ -38,6 +38,21 @@ Item { implicitWidth: Math.max(icon.implicitWidth, current.implicitHeight) implicitHeight: icon.implicitHeight + current.implicitWidth + current.anchors.topMargin + Loader { + anchors.fill: parent + active: !Config.bar.activeWindow.showOnHover + + sourceComponent: MouseArea { + cursorShape: Qt.PointingHandCursor + onClicked: { + const popouts = root.bar.popouts; + popouts.currentName = "activewindow"; + popouts.currentCenter = root.mapToItem(root.bar, 0, root.implicitHeight / 2).y; + popouts.hasCurrent = true; + } + } + } + MaterialIcon { id: icon -- cgit v1.2.3-freya