Add a light mode that keeps the same identity
Light is Tokyo Night Day, the palette's own light variant, rather than one invented to merely not be dark. Both share the same hues at different lightness, which is what lets the Prism signature survive the switch: blue still leads into orchid, it is simply a darker blue on a lighter ground. Every colour token became a binding on one boolean, so flipping it repaints the whole shell without any component needing to know it happened. That only worked because nothing outside Theme.qml defines a colour; the two places that did are fixed here. Surface alphas differ by scheme. The 0.34 that reads as glass over a dark desktop reads as haze over a light one, and text stops being legible on it. Two things that draw on this desktop do not read Panama's store: GTK applications, which read gsettings, and the compositor, which draws window borders. A toolbar or a border still wearing the other scheme is more jarring than either scheme on its own, so ColorScheme pushes the choice to both. It also pushes at startup, since a scheme chosen in a previous session would otherwise be in effect only for the shell. The unfocused window border follows too. It is a flat neutral, and a dark neutral is invisible against a light desktop. The focused border is the prism gradient and needs no variant. The live preview follows the scheme as well. A preview that stayed dark while the shell around it went light did not read as "your desktop", it read as a screenshot of someone else's. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
@@ -50,10 +50,13 @@ Rectangle {
|
||||
|
||||
// Stands in for the wallpaper. Static: an animated gradient here would
|
||||
// repaint forever behind a settings page.
|
||||
// Follows the colour scheme. A preview that stays dark while the shell
|
||||
// around it is light does not read as "your desktop" -- it reads as a
|
||||
// screenshot of someone else's.
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Vertical
|
||||
GradientStop { position: 0.0; color: "#2b3050" }
|
||||
GradientStop { position: 1.0; color: "#241f33" }
|
||||
GradientStop { position: 0.0; color: Theme.dark ? "#2b3050" : "#b9c0dd" }
|
||||
GradientStop { position: 1.0; color: Theme.dark ? "#241f33" : "#cbbcd4" }
|
||||
}
|
||||
|
||||
// The bar, so the preview reads as this desktop and not a generic one.
|
||||
@@ -203,7 +206,7 @@ Rectangle {
|
||||
shadowEnabled: true
|
||||
shadowColor: win.focused && root.glowOn
|
||||
? Theme.alpha(Theme.accent, 0.5)
|
||||
: Theme.alpha("#15161e", 0.85)
|
||||
: Theme.alpha(Theme.dark ? "#15161e" : "#6172b0", Theme.dark ? 0.85 : 0.45)
|
||||
shadowBlur: win.focused && root.glowOn
|
||||
? Math.min(1.0, root.px(root.glowRange) / 12)
|
||||
: Math.min(1.0, root.px(root.shadowRange) / 24)
|
||||
|
||||
Reference in New Issue
Block a user