bread-theme: correct [launcher] manifest to match breadbox's actual behaviour
radius (20 -> 8) and icon_px (36 -> 32) were demo-derived aspirations, not what breadbox implements today (.launcher-bg's actual border-radius and make_icon's actual set_pixel_size). row_anim/rule/footer/sections/modes are kept but marked declared-but-not-yet-consumed: breadbox implements none of row animation, a rule/divider, a footer, sections, or query modes today, so the manifest should say so rather than imply they're live. Adds a builtin launcher test mirroring the existing window/tokens fidelity tests.
This commit is contained in:
parent
ea9758a5d5
commit
53a6c59f2d
2 changed files with 37 additions and 4 deletions
|
|
@ -8,8 +8,10 @@
|
||||||
# breadbar/src/theme.rs (load_css's radius/pad/spring locals and the actual
|
# breadbar/src/theme.rs (load_css's radius/pad/spring locals and the actual
|
||||||
# CSS selectors), breadbar/src/{panel,osd}.rs and
|
# CSS selectors), breadbar/src/{panel,osd}.rs and
|
||||||
# breadbar/src/notifications/{popup,history}.rs (satellite window anchors,
|
# breadbar/src/notifications/{popup,history}.rs (satellite window anchors,
|
||||||
# margins, namespaces), breadbox/breadbox/src/main.rs:341-344 (launcher
|
# margins, namespaces), breadbox/breadbox/src/main.rs:341-346 (launcher
|
||||||
# geometry), ~/.config/hypr/scripts/ui/rules.lua (compositor rules).
|
# margin/size), :151 (build_css's .launcher-bg radius), :174-193 (make_icon's
|
||||||
|
# set_pixel_size calls), ~/.config/hypr/scripts/ui/rules.lua (compositor
|
||||||
|
# rules).
|
||||||
|
|
||||||
name = "Liquid Motion"
|
name = "Liquid Motion"
|
||||||
id = "liquid-motion"
|
id = "liquid-motion"
|
||||||
|
|
@ -85,8 +87,24 @@ show_date = false
|
||||||
mode = "overlay"
|
mode = "overlay"
|
||||||
width = 600
|
width = 600
|
||||||
top = "120px"
|
top = "120px"
|
||||||
radius = 20
|
# .launcher-bg { border-radius: 8px } (build_css, main.rs:151) — corrected
|
||||||
icon_px = 36
|
# from an earlier demo-derived 20px; breadbox does not implement the demo's
|
||||||
|
# 20px rounding.
|
||||||
|
radius = 8
|
||||||
|
# make_icon() (main.rs:174-193) calls img.set_pixel_size(32) on both the
|
||||||
|
# cached-texture (gio::File/gdk::Texture) path and the GTK icon-theme
|
||||||
|
# fallback path — corrected from a demo-derived 36px.
|
||||||
|
icon_px = 32
|
||||||
|
# Declared-but-not-yet-consumed: breadbox's Phase 4b-i wiring reads only
|
||||||
|
# mode/width/top/radius/icon_px above; it does not read any of the five keys
|
||||||
|
# below. row_anim/rule/footer are demo-derived aspirations breadbox
|
||||||
|
# implements not at all today (no row entrance/exit animation, no
|
||||||
|
# rule/divider element between the search entry and the list, no footer
|
||||||
|
# widget summarizing app count). sections/modes happen to already describe
|
||||||
|
# today's actual (trivial) behaviour — one flat unsectioned list, plain app
|
||||||
|
# search with no calc/command/url modes — but are likewise unread by any
|
||||||
|
# code path; a real sections/modes implementation is Phase 5/6, same as the
|
||||||
|
# other three.
|
||||||
row_anim = "flip"
|
row_anim = "flip"
|
||||||
rule = "gradient"
|
rule = "gradient"
|
||||||
footer = "count_apps"
|
footer = "count_apps"
|
||||||
|
|
|
||||||
|
|
@ -563,6 +563,21 @@ mod tests {
|
||||||
assert!(matches!(theme.modules().clock.style, ClockStyle::Flip));
|
assert!(matches!(theme.modules().clock.style, ClockStyle::Flip));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn builtin_launcher_matches_current_breadbox_geometry() {
|
||||||
|
// breadbox/breadbox/src/main.rs:341-346 (margin/size), :151
|
||||||
|
// (build_css's .launcher-bg radius), :174-193 (make_icon's
|
||||||
|
// set_pixel_size calls). radius=8 and icon_px=32 are current CODE
|
||||||
|
// values, not the demo's 20/36 — see Phase 4b-i's manifest audit.
|
||||||
|
let theme = resolve_builtin();
|
||||||
|
let l = theme.launcher();
|
||||||
|
assert!(matches!(l.mode, LauncherMode::Overlay));
|
||||||
|
assert_eq!(l.width, 600);
|
||||||
|
assert_eq!(l.top, "120px");
|
||||||
|
assert_eq!(l.radius, 8);
|
||||||
|
assert_eq!(l.icon_px, 32);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn builtin_css_substitutes_tokens_and_leaves_palette_names_untouched() {
|
fn builtin_css_substitutes_tokens_and_leaves_palette_names_untouched() {
|
||||||
let theme = resolve_builtin();
|
let theme = resolve_builtin();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue