mirror of
https://github.com/Sn3akyy1/lucid.git
synced 2026-11-20 21:52:29 +03:00
Launcher and bar panels: denser glass, so they read as the bar does
The launcher and the bar were the same glass, but the launcher is big and see-through, so over a bright sky it showed as a pale slab beside a bar lying over dark ground. Big glass (the launcher, a bar panel on the full bar) now takes Theme.bgDense, letting a sixth as much through as the bar does at the same Glass level (0.92 opaque at 0.5, solid at 0). Where it meets the strip it starts at the strip's glass and thickens over Theme.glassRamp, so the join shows no line: the launcher's foot standing on the bar, a panel's body, the gaps between merged panels, the corners at a panel's feet and the fillets. Over the sky in the rig the launcher went from 56,70,85 to 30,47,54 against a bar at 22-25,35-38,40-44. The dock itself keeps the bar's glass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+22
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user