From 1430eeb6d413a89a9036cb386f1d5fef41e090af Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 21:13:37 +0200 Subject: [PATCH 1/3] fix hover panel position: compute anchorX lazily on show, not at binding time --- modules/Backlight.qml | 2 +- modules/HoverPanel.qml | 11 +++++++++-- modules/Mpris.qml | 2 +- modules/Volume.qml | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/Backlight.qml b/modules/Backlight.qml index 396ee85..0973603 100644 --- a/modules/Backlight.qml +++ b/modules/Backlight.qml @@ -99,7 +99,7 @@ M.BarSection { id: hoverPanel showPanel: root._showPanel screen: QsWindow.window?.screen ?? null - anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) + anchorItem: root accentColor: root.accentColor panelNamespace: "nova-backlight" contentWidth: 200 diff --git a/modules/HoverPanel.qml b/modules/HoverPanel.qml index 3ac7640..01a68d5 100644 --- a/modules/HoverPanel.qml +++ b/modules/HoverPanel.qml @@ -9,7 +9,7 @@ PanelWindow { id: root required property bool showPanel - required property real anchorX + required property Item anchorItem required property color accentColor property string panelNamespace: "nova-panel" property real contentWidth: 220 @@ -31,7 +31,6 @@ PanelWindow { anchors.left: true margins.top: 0 - margins.left: Math.max(0, Math.min(Math.round(anchorX - contentWidth / 2), (screen?.width ?? 1920) - contentWidth)) implicitWidth: panelContent.width implicitHeight: panelContent.height @@ -44,8 +43,16 @@ PanelWindow { } } + function _updatePosition() { + const pt = anchorItem.mapToGlobal(anchorItem.width / 2, 0); + const scr = screen; + const sw = scr?.width ?? 1920; + margins.left = Math.max(0, Math.min(Math.round(pt.x - (scr?.x ?? 0) - contentWidth / 2), sw - contentWidth)); + } + onShowPanelChanged: { if (showPanel) { + _updatePosition(); _winVisible = true; hideAnim.stop(); showAnim.start(); diff --git a/modules/Mpris.qml b/modules/Mpris.qml index 4cf8907..e3295d0 100644 --- a/modules/Mpris.qml +++ b/modules/Mpris.qml @@ -99,7 +99,7 @@ M.BarSection { id: hoverPanel showPanel: root._showPanel screen: QsWindow.window?.screen ?? null - anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) + anchorItem: root accentColor: root.accentColor panelNamespace: "nova-mpris" contentWidth: 280 diff --git a/modules/Volume.qml b/modules/Volume.qml index 982a8a6..c75abe5 100644 --- a/modules/Volume.qml +++ b/modules/Volume.qml @@ -109,7 +109,7 @@ M.BarSection { id: hoverPanel showPanel: root._showPanel screen: QsWindow.window?.screen ?? null - anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) + anchorItem: root accentColor: root.accentColor panelNamespace: "nova-volume" contentWidth: 220 From 5d472ab086595d3b51f238a953a5d185434e1cec Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 21:21:07 +0200 Subject: [PATCH 2/3] frosted glass background for bar groups --- modules/BarGroup.qml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/modules/BarGroup.qml b/modules/BarGroup.qml index 5743ae8..9a344e5 100644 --- a/modules/BarGroup.qml +++ b/modules/BarGroup.qml @@ -56,17 +56,17 @@ Item { shadowHorizontalOffset: 0 } - // Solid background + // Frosted base — semi-transparent so the bar background bleeds through Rectangle { anchors.fill: parent topLeftRadius: root._tlr topRightRadius: root._trr bottomLeftRadius: root._blr bottomRightRadius: root._brr - color: M.Theme.base01 + color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.55) } - // Accent gradient overlay + // Frost sheen — subtle white highlight, top-heavy Rectangle { anchors.fill: parent topLeftRadius: root._tlr @@ -76,7 +76,26 @@ Item { gradient: Gradient { GradientStop { position: 0 - color: Qt.rgba(root.borderColor.r, root.borderColor.g, root.borderColor.b, 0.15) + color: Qt.rgba(1, 1, 1, 0.07) + } + GradientStop { + position: 0.5 + color: "transparent" + } + } + } + + // Accent tint + Rectangle { + anchors.fill: parent + topLeftRadius: root._tlr + topRightRadius: root._trr + bottomLeftRadius: root._blr + bottomRightRadius: root._brr + gradient: Gradient { + GradientStop { + position: 0 + color: Qt.rgba(root.borderColor.r, root.borderColor.g, root.borderColor.b, 0.12) } GradientStop { position: 1 From 8f09492fc21bce2c3f76b4158c0a5f736a004bd4 Mon Sep 17 00:00:00 2001 From: Damocles Date: Mon, 13 Apr 2026 21:21:46 +0200 Subject: [PATCH 3/3] replace rainbow hex edge shimmer with theme color gradient --- modules/hex_wave.frag | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/hex_wave.frag b/modules/hex_wave.frag index 55f7d96..6c0e4c2 100644 --- a/modules/hex_wave.frag +++ b/modules/hex_wave.frag @@ -22,9 +22,11 @@ float sdHexagon(vec2 p, float r) { return length(p) * sign(p.y); } -// Rainbow from angle — color picker style -vec3 hsv2rgb(float h) { - return clamp(abs(mod(h * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0); +// Interpolate between three theme stops (t in [0,1]) +vec3 themeGradient(float t) { + return t < 0.5 + ? mix(uC0.rgb, uC1.rgb, t * 2.0) + : mix(uC1.rgb, uC2.rgb, (t - 0.5) * 2.0); } void main() { @@ -73,15 +75,13 @@ void main() { float edgeWidth = 5.0; float edgeFactor = smoothstep(-edgeWidth, 0.0, d); // 0 at interior, 1 at edge if (wf > 0.01 && edgeFactor > 0.0) { - // Angle around hex center → hue + // Vary shimmer color across theme gradient using angle + position float angle = atan(p.y, p.x); - float hue = (angle + 3.14159) / 6.28318; - // Shift hue by position so neighboring hexes have different phase - hue = fract(hue + center.x * 0.003 + center.y * 0.005); - vec3 rainbow = hsv2rgb(hue); + float t = fract((angle + 3.14159) / 6.28318 + center.x * 0.003 + center.y * 0.005); + vec3 shimmerColor = themeGradient(t); float shimmer = edgeFactor * wf; - rgb = mix(rgb, rainbow, shimmer * 0.8); + rgb = mix(rgb, shimmerColor, shimmer * 0.8); a = mix(a, 0.5, shimmer * 0.6); }