From 91657003c09e5e4db138cebcc41acdcc711605a5 Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 16:18:31 +0200 Subject: [PATCH] tooltip flyout border matches module accent color --- modules/BarIcon.qml | 1 + modules/BarLabel.qml | 1 + modules/BarSection.qml | 1 + modules/Flyout.qml | 4 +++- modules/FlyoutState.qml | 1 + modules/Tray.qml | 1 + modules/Workspaces.qml | 1 + 7 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/BarIcon.qml b/modules/BarIcon.qml index 24a01ce..0bbb578 100644 --- a/modules/BarIcon.qml +++ b/modules/BarIcon.qml @@ -70,6 +70,7 @@ Text { M.FlyoutState.text = root.tooltip; M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; + M.FlyoutState.accentColor = parent?.accentColor ?? root.color; M.FlyoutState.visible = true; } else if (!hovered && root.tooltip !== "") { M.FlyoutState.visible = false; diff --git a/modules/BarLabel.qml b/modules/BarLabel.qml index 1c30699..ba6dd5e 100644 --- a/modules/BarLabel.qml +++ b/modules/BarLabel.qml @@ -41,6 +41,7 @@ Text { M.FlyoutState.text = root.tooltip; M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; + M.FlyoutState.accentColor = parent?.accentColor ?? root.color; M.FlyoutState.visible = true; } else if (!hovered && root.tooltip !== "") { M.FlyoutState.visible = false; diff --git a/modules/BarSection.qml b/modules/BarSection.qml index a2b0039..fbc7dbb 100644 --- a/modules/BarSection.qml +++ b/modules/BarSection.qml @@ -31,6 +31,7 @@ Row { M.FlyoutState.text = root.tooltip; M.FlyoutState.itemX = root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; + M.FlyoutState.accentColor = root.accentColor; M.FlyoutState.visible = true; } else if (!hovered && root.tooltip !== "") { M.FlyoutState.visible = false; diff --git a/modules/Flyout.qml b/modules/Flyout.qml index 5570635..58539c0 100644 --- a/modules/Flyout.qml +++ b/modules/Flyout.qml @@ -85,12 +85,14 @@ PanelWindow { Rectangle { anchors.fill: parent - color: M.Theme.base00 + color: M.Theme.base01 opacity: Math.max(M.Theme.barOpacity, 0.85) topLeftRadius: 0 topRightRadius: 0 bottomLeftRadius: M.Theme.radius bottomRightRadius: M.Theme.radius + border.color: M.FlyoutState.accentColor + border.width: 1 } Text { diff --git a/modules/FlyoutState.qml b/modules/FlyoutState.qml index e2e51b3..3c0ee8c 100644 --- a/modules/FlyoutState.qml +++ b/modules/FlyoutState.qml @@ -6,4 +6,5 @@ QtObject { property string text: "" property real itemX: 0 property var screen: null + property color accentColor: "#cdd6f4" } diff --git a/modules/Tray.qml b/modules/Tray.qml index afa7d5a..4493d17 100644 --- a/modules/Tray.qml +++ b/modules/Tray.qml @@ -76,6 +76,7 @@ RowLayout { M.FlyoutState.text = tip; M.FlyoutState.itemX = iconItem.mapToGlobal(iconItem.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; + M.FlyoutState.accentColor = root.parent?.accentColor ?? M.Theme.base05; M.FlyoutState.visible = true; } else if (!hovered) { M.FlyoutState.visible = false; diff --git a/modules/Workspaces.qml b/modules/Workspaces.qml index fadc42d..f4970b4 100644 --- a/modules/Workspaces.qml +++ b/modules/Workspaces.qml @@ -79,6 +79,7 @@ Row { M.FlyoutState.text = name; M.FlyoutState.itemX = pill.mapToGlobal(pill.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0); M.FlyoutState.screen = QsWindow.window?.screen ?? null; + M.FlyoutState.accentColor = root.parent?.accentColor ?? M.Theme.base05; M.FlyoutState.visible = true; } else { M.FlyoutState.visible = false;