shell themes: give the launcher panel its own opacity
tokens.bg_alpha governs the bar, which stays readable at 0.72 because it covers a thin strip of wallpaper. A full launcher panel at that alpha washes out badly over a bright wallpaper and its text becomes hard to read — which is what breadbox looked like, since it hardcoded 0.60 and read no theme value at all. Adds [launcher].panel_alpha, set to the approved reference's own values: 0.95 for glass-workbench, 0.93 for liquid-motion.
This commit is contained in:
parent
5b5b17fdf4
commit
80e25f23b3
4 changed files with 20 additions and 0 deletions
|
|
@ -121,6 +121,10 @@ search_font_size = 14
|
||||||
search_padding_v = 12
|
search_padding_v = 12
|
||||||
search_padding_h = 15
|
search_padding_h = 15
|
||||||
# `.bx .r.sel { background: rgba(accent, .28) }`
|
# `.bx .r.sel { background: rgba(accent, .28) }`
|
||||||
|
# Panel opacity, separate from tokens.bg_alpha (the bar). Matches the
|
||||||
|
# approved reference: demo `.bx.gw{background:rgba(16,20,18,.95)}`. breadbox hardcoded 0.60, which washed the
|
||||||
|
# panel out over a bright wallpaper.
|
||||||
|
panel_alpha = 0.95
|
||||||
selection_alpha = 0.28
|
selection_alpha = 0.28
|
||||||
|
|
||||||
# Same four satellite namespaces as liquid-motion, keyed identically so the
|
# Same four satellite namespaces as liquid-motion, keyed identically so the
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,10 @@ search_font_size = 16
|
||||||
search_padding_v = 16
|
search_padding_v = 16
|
||||||
search_padding_h = 18
|
search_padding_h = 18
|
||||||
# `.bx .r.sel { background: rgba(accent, .22) }`
|
# `.bx .r.sel { background: rgba(accent, .22) }`
|
||||||
|
# Panel opacity, separate from tokens.bg_alpha (the bar). Matches the
|
||||||
|
# approved reference: demo `.bx.lm{background:rgba(21,14,23,.93)}`. breadbox hardcoded 0.60, which washed the
|
||||||
|
# panel out over a bright wallpaper.
|
||||||
|
panel_alpha = 0.93
|
||||||
selection_alpha = 0.22
|
selection_alpha = 0.22
|
||||||
|
|
||||||
# Keyed by layer-shell namespace, matching [compositor.*] below, so the two
|
# Keyed by layer-shell namespace, matching [compositor.*] below, so the two
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ pub(super) struct RawLauncher {
|
||||||
pub(super) search_font_size: Option<i64>,
|
pub(super) search_font_size: Option<i64>,
|
||||||
pub(super) search_padding_v: Option<i64>,
|
pub(super) search_padding_v: Option<i64>,
|
||||||
pub(super) search_padding_h: Option<i64>,
|
pub(super) search_padding_h: Option<i64>,
|
||||||
|
pub(super) panel_alpha: Option<f64>,
|
||||||
pub(super) selection_alpha: Option<f64>,
|
pub(super) selection_alpha: Option<f64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -435,6 +436,9 @@ fn resolve_launcher(theme_id: &str, l: Option<&RawLauncher>) -> anyhow::Result<L
|
||||||
search_font_size: l.and_then(|l| l.search_font_size).unwrap_or(16) as i32,
|
search_font_size: l.and_then(|l| l.search_font_size).unwrap_or(16) as i32,
|
||||||
search_padding_v: l.and_then(|l| l.search_padding_v).unwrap_or(12) as i32,
|
search_padding_v: l.and_then(|l| l.search_padding_v).unwrap_or(12) as i32,
|
||||||
search_padding_h: l.and_then(|l| l.search_padding_h).unwrap_or(16) as i32,
|
search_padding_h: l.and_then(|l| l.search_padding_h).unwrap_or(16) as i32,
|
||||||
|
// 0.93 default, not breadbox's historical 0.60: a launcher panel needs
|
||||||
|
// near-opacity to stay legible over a bright wallpaper.
|
||||||
|
panel_alpha: l.and_then(|l| l.panel_alpha).unwrap_or(0.93),
|
||||||
selection_alpha: l.and_then(|l| l.selection_alpha).unwrap_or(0.24),
|
selection_alpha: l.and_then(|l| l.selection_alpha).unwrap_or(0.24),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -256,6 +256,14 @@ pub struct Launcher {
|
||||||
pub search_padding_v: i32,
|
pub search_padding_v: i32,
|
||||||
/// Search entry horizontal padding (px).
|
/// Search entry horizontal padding (px).
|
||||||
pub search_padding_h: i32,
|
pub search_padding_h: i32,
|
||||||
|
/// Opacity of the launcher PANEL itself, distinct from `tokens.bg_alpha`
|
||||||
|
/// (which governs the thin bar). A bar can be very translucent and stay
|
||||||
|
/// readable because it is 36-44px tall over a small slice of wallpaper; a
|
||||||
|
/// full launcher panel at the same alpha washes out badly over a bright
|
||||||
|
/// wallpaper and its text becomes hard to read. The approved reference
|
||||||
|
/// uses 0.95 (glass-workbench) and 0.93 (liquid-motion); breadbox
|
||||||
|
/// previously hardcoded 0.60, which is what made it look washed out.
|
||||||
|
pub panel_alpha: f64,
|
||||||
/// Selected/hovered row background: `alpha(@accent, selection_alpha)`.
|
/// Selected/hovered row background: `alpha(@accent, selection_alpha)`.
|
||||||
/// Liquid Motion's softer 0.22 vs Glass Workbench's denser 0.28 — see
|
/// Liquid Motion's softer 0.22 vs Glass Workbench's denser 0.28 — see
|
||||||
/// each demo's `.bx .r.sel` rule.
|
/// each demo's `.bx .r.sel` rule.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue