diff --git a/Theme.qml b/Theme.qml index 0fa73d2..ff134ae 100644 --- a/Theme.qml +++ b/Theme.qml @@ -159,6 +159,18 @@ Singleton { readonly property color mBright: root.surface(root.cSurfaceBright, root._toneShift) readonly property color bg: root.alpha(root.mContainer, 1 - root.blurAmount * 0.85) + // big glass, the launcher and a bar panel, lets far less through than the bar's + // strip, so a bright wallpaper behind it does not wash it out against the bar + readonly property color bgDense: root.alpha(root.mContainer, 1 - root.blurAmount * 0.17) + // where big glass meets the strip it starts at the strip's density and thickens + // over this far, so the two join without a line + readonly property int glassRamp: root.dp(48) + + // the glass that far into big glass from where it meets the strip + function glassAt(depth) { + const t = Math.max(0, Math.min(1, depth / Math.max(1, root.glassRamp))); + return root.alpha(root.mContainer, root.bg.a + (root.bgDense.a - root.bg.a) * t); + } readonly property color bgTransparent: root.alpha(root.bg, 0) readonly property color bgOpaque: root.mContainer readonly property color bgSunken: root.mLow diff --git a/lucidbar/BarFlare.qml b/lucidbar/BarFlare.qml index 6eb3a6b..33fee8c 100644 --- a/lucidbar/BarFlare.qml +++ b/lucidbar/BarFlare.qml @@ -11,6 +11,26 @@ Item { property int size: Theme.dp(14) property color fillColor: Theme.bg property bool hovered: false + // a corner where a panel meets the full bar's strip: the strip's glass along its + // top edge, thickening downwards as the panel beside it does + property bool ramped: false + readonly property LinearGradient rampFill: LinearGradient { + x1: 0 + y1: 0 + x2: 0 + y2: Theme.glassRamp + + GradientStop { + position: 0 + color: Theme.bg + } + + GradientStop { + position: 1 + color: Theme.bgDense + } + + } property real tint: flare.hovered ? 0.08 : 0 @@ -41,6 +61,7 @@ Item { ShapePath { strokeWidth: 0 fillColor: Qt.tint(flare.fillColor, Qt.rgba(Theme.text.r, Theme.text.g, Theme.text.b, flare.tint)) + fillGradient: flare.ramped ? flare.rampFill : null startX: flare.size startY: flare.size diff --git a/lucidbar/BarPill.qml b/lucidbar/BarPill.qml index 06346f4..e6de0d3 100644 --- a/lucidbar/BarPill.qml +++ b/lucidbar/BarPill.qml @@ -685,13 +685,34 @@ Item { // the panel below the strip. it starts where the strip ends on screen, so a // bob of the jelly opens no gap between them Rectangle { + id: panelBody + visible: pill.bodyBelowStrip y: Math.min(shell.height, pill.compactHeight / Math.max(0.5, jelly.yScale)) width: shell.width height: Math.max(0, shell.height - y) - color: Theme.bg bottomLeftRadius: shell.bottomLeftRadius bottomRightRadius: shell.bottomRightRadius + + // the strip's glass where it joins the strip, then the denser glass of a panel + gradient: Gradient { + GradientStop { + position: 0 + color: Theme.bg + } + + GradientStop { + position: Math.min(1, Theme.glassRamp / Math.max(1, panelBody.height)) + color: Theme.bgDense + } + + GradientStop { + position: 1 + color: Theme.bgDense + } + + } + } // handlers on the surface itself, so hovering the panel's own contents diff --git a/lucidbar/Theme.qml b/lucidbar/Theme.qml index 0fa73d2..ff134ae 100644 --- a/lucidbar/Theme.qml +++ b/lucidbar/Theme.qml @@ -159,6 +159,18 @@ Singleton { readonly property color mBright: root.surface(root.cSurfaceBright, root._toneShift) readonly property color bg: root.alpha(root.mContainer, 1 - root.blurAmount * 0.85) + // big glass, the launcher and a bar panel, lets far less through than the bar's + // strip, so a bright wallpaper behind it does not wash it out against the bar + readonly property color bgDense: root.alpha(root.mContainer, 1 - root.blurAmount * 0.17) + // where big glass meets the strip it starts at the strip's density and thickens + // over this far, so the two join without a line + readonly property int glassRamp: root.dp(48) + + // the glass that far into big glass from where it meets the strip + function glassAt(depth) { + const t = Math.max(0, Math.min(1, depth / Math.max(1, root.glassRamp))); + return root.alpha(root.mContainer, root.bg.a + (root.bgDense.a - root.bg.a) * t); + } readonly property color bgTransparent: root.alpha(root.bg, 0) readonly property color bgOpaque: root.mContainer readonly property color bgSunken: root.mLow diff --git a/luciddocks/Dock.qml b/luciddocks/Dock.qml index 6f037e1..60090b2 100644 --- a/luciddocks/Dock.qml +++ b/luciddocks/Dock.qml @@ -3138,6 +3138,37 @@ PanelWindow { radius: Math.min(Theme.rad(Prefs.dockRadius), Math.round(Theme.pill(shell.height))) // split, the islands below paint it color: dockWindow.splitDrawn ? "transparent" : Theme.bg + // the launcher is big glass, denser than the dock, so a bright wallpaper does not + // wash it out; standing on the bar its foot keeps the bar's glass, so the two + // join without a line + property color bodyGlass: dockWindow.menuOpen ? Theme.bgDense : Theme.bg + readonly property color footGlass: dockWindow.onBar ? Theme.bg : shell.bodyGlass + + Behavior on bodyGlass { + ColorAnimation { + duration: Theme.durLong + easing.type: Easing.OutCubic + } + + } + + gradient: Gradient { + GradientStop { + position: 0 + color: dockWindow.splitDrawn ? "transparent" : shell.bodyGlass + } + + GradientStop { + position: dockWindow.onBar ? Math.max(0, 1 - Theme.glassRamp / Math.max(1, shell.height)) : 1 + color: dockWindow.splitDrawn ? "transparent" : shell.bodyGlass + } + + GradientStop { + position: 1 + color: dockWindow.splitDrawn ? "transparent" : shell.footGlass + } + + } // corners meeting the screen edge square off in notch mode bottomLeftRadius: dockWindow.renderAsNotch ? 0 : shell.radius bottomRightRadius: dockWindow.renderAsNotch ? 0 : shell.radius @@ -3690,6 +3721,8 @@ PanelWindow { readonly property bool isRight: index === 1 + fillColor: shell.footGlass + size: Theme.dp(Prefs.dockNotchFlare) mirrored: isRight x: isRight ? dockWindow.paintX + dockWindow.paintW : dockWindow.paintX - width diff --git a/shell.qml b/shell.qml index 7b72139..0255885 100644 --- a/shell.qml +++ b/shell.qml @@ -1055,6 +1055,7 @@ ShellRoot { z: -1 BarFlare { + ramped: true size: bar.panelFlareSize(panelFlares.modelData, true) // butted against the panel: half a pixel over it was a second coat on its edge x: panelFlares.modelData.x - width @@ -1062,6 +1063,7 @@ ShellRoot { } BarFlare { + ramped: true mirrored: true size: bar.panelFlareSize(panelFlares.modelData, false) x: panelFlares.modelData.x + panelFlares.modelData.width @@ -1361,6 +1363,8 @@ ShellRoot { readonly property var spec: bar.hangPlan.fillets.length > index ? bar.hangPlan.fillets[index] : null z: 0 + // as dense as the panels around it, that far below the strip + fillColor: Prefs.barFull && spec ? Theme.glassAt(spec.y - Theme.dp(Prefs.barHeight)) : Theme.bg size: spec ? spec.size : 0 mirrored: spec ? spec.mirrored : false flipped: spec ? spec.flipped : false @@ -1384,7 +1388,26 @@ ShellRoot { y: spec ? spec.y : 0 width: spec ? spec.w : 0 height: spec ? spec.h : 0 - color: Theme.bg + + // on the full bar it runs from the strip down between two panels, so it + // thickens as they do + gradient: Gradient { + GradientStop { + position: 0 + color: Theme.bg + } + + GradientStop { + position: Prefs.barFull ? Math.min(1, Theme.glassRamp / Math.max(1, spec ? spec.h : 1)) : 1 + color: Prefs.barFull ? Theme.bgDense : Theme.bg + } + + GradientStop { + position: 1 + color: Prefs.barFull ? Theme.bgDense : Theme.bg + } + + } } }