diff --git a/modules/Backlight.qml b/modules/Backlight.qml index 0973603..396ee85 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 - anchorItem: root + anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) accentColor: root.accentColor panelNamespace: "nova-backlight" contentWidth: 200 diff --git a/modules/BarGroup.qml b/modules/BarGroup.qml index 9a344e5..5743ae8 100644 --- a/modules/BarGroup.qml +++ b/modules/BarGroup.qml @@ -56,17 +56,17 @@ Item { shadowHorizontalOffset: 0 } - // Frosted base — semi-transparent so the bar background bleeds through + // Solid background Rectangle { anchors.fill: parent topLeftRadius: root._tlr topRightRadius: root._trr bottomLeftRadius: root._blr bottomRightRadius: root._brr - color: Qt.rgba(M.Theme.base01.r, M.Theme.base01.g, M.Theme.base01.b, 0.55) + color: M.Theme.base01 } - // Frost sheen — subtle white highlight, top-heavy + // Accent gradient overlay Rectangle { anchors.fill: parent topLeftRadius: root._tlr @@ -76,26 +76,7 @@ Item { gradient: Gradient { GradientStop { position: 0 - 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) + color: Qt.rgba(root.borderColor.r, root.borderColor.g, root.borderColor.b, 0.15) } GradientStop { position: 1 diff --git a/modules/HoverPanel.qml b/modules/HoverPanel.qml index 01a68d5..3ac7640 100644 --- a/modules/HoverPanel.qml +++ b/modules/HoverPanel.qml @@ -9,7 +9,7 @@ PanelWindow { id: root required property bool showPanel - required property Item anchorItem + required property real anchorX required property color accentColor property string panelNamespace: "nova-panel" property real contentWidth: 220 @@ -31,6 +31,7 @@ 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 @@ -43,16 +44,8 @@ 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 e3295d0..4cf8907 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 - anchorItem: root + anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) accentColor: root.accentColor panelNamespace: "nova-mpris" contentWidth: 280 diff --git a/modules/Volume.qml b/modules/Volume.qml index c75abe5..982a8a6 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 - anchorItem: root + anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0) accentColor: root.accentColor panelNamespace: "nova-volume" contentWidth: 220 diff --git a/modules/hex_wave.frag b/modules/hex_wave.frag index 6c0e4c2..55f7d96 100644 --- a/modules/hex_wave.frag +++ b/modules/hex_wave.frag @@ -22,11 +22,9 @@ float sdHexagon(vec2 p, float r) { return length(p) * sign(p.y); } -// 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); +// 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); } void main() { @@ -75,13 +73,15 @@ 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) { - // Vary shimmer color across theme gradient using angle + position + // Angle around hex center → hue float angle = atan(p.y, p.x); - float t = fract((angle + 3.14159) / 6.28318 + center.x * 0.003 + center.y * 0.005); - vec3 shimmerColor = themeGradient(t); + 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 shimmer = edgeFactor * wf; - rgb = mix(rgb, shimmerColor, shimmer * 0.8); + rgb = mix(rgb, rainbow, shimmer * 0.8); a = mix(a, 0.5, shimmer * 0.6); }