shell themes: bring chip_height and dot_widths up to the approved reference
breadbar had to hardcode past these: the manifests carried pre-review values (chip_height 32/20/36, dot_widths [6,10,14,18]) that disagreed with what the bar actually draws, so a chrome pass overrode them locally rather than let the manifest dictate wrong geometry. Updated to what the user approved on the interactive reference in bos-ui-demos/proposed/: one chip highlight height per bar (26 island, 22 flush, 22 capsule) and Option-B dot widths [8,13,17,22]. Two tests pinned the old numbers and are updated with the reason. A manifest that states one thing while the app draws another is the defect class this project has hit repeatedly; the local hardcodes in breadbar can now be removed in favour of these.
This commit is contained in:
parent
3a22b62694
commit
5b5b17fdf4
4 changed files with 8 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ accent_to = "green"
|
||||||
# workspace pills, and is reused for the bar's other small chips (cpu/ram/
|
# workspace pills, and is reused for the bar's other small chips (cpu/ram/
|
||||||
# wifi/battery/control) so they all sit at the same height on the thinner
|
# wifi/battery/control) so they all sit at the same height on the thinner
|
||||||
# 36px flush bar.
|
# 36px flush bar.
|
||||||
chip_height = 20
|
chip_height = 22
|
||||||
# No demo number for bar-icon size; scaled from liquid-motion's 24px by the
|
# No demo number for bar-icon size; scaled from liquid-motion's 24px by the
|
||||||
# same 36/44 bar-height ratio liquid-motion itself uses for its 44px bar.
|
# same 36/44 bar-height ratio liquid-motion itself uses for its 44px bar.
|
||||||
icon_px = 18
|
icon_px = 18
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ accent_from = "accent"
|
||||||
accent_to = "teal"
|
accent_to = "teal"
|
||||||
# Not in the plan's §4 schema list, but breadbar::CHIP_HEIGHT / ::ICON_PX
|
# Not in the plan's §4 schema list, but breadbar::CHIP_HEIGHT / ::ICON_PX
|
||||||
# today.
|
# today.
|
||||||
chip_height = 32
|
chip_height = 26
|
||||||
icon_px = 24
|
icon_px = 24
|
||||||
|
|
||||||
[bar.window]
|
[bar.window]
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ accent_to = "pink"
|
||||||
# the dots (`.dots button`) are sized entirely by `dot_widths` below, not by
|
# the dots (`.dots button`) are sized entirely by `dot_widths` below, not by
|
||||||
# chip_height, but this token still feeds any other chip-shaped element
|
# chip_height, but this token still feeds any other chip-shaped element
|
||||||
# (e.g. a future result-row affordance) at the bar's own row height.
|
# (e.g. a future result-row affordance) at the bar's own row height.
|
||||||
chip_height = 36
|
chip_height = 22
|
||||||
# Demo: `.ico { width: 30px; height: 30px }` for a result row's icon
|
# Demo: `.ico { width: 30px; height: 30px }` for a result row's icon
|
||||||
# swatch — the icon glyph itself sits inside that box with implicit
|
# swatch — the icon glyph itself sits inside that box with implicit
|
||||||
# padding, so the icon_px passed to bread-launcher's `ResultsList` is sized
|
# padding, so the icon_px passed to bread-launcher's `ResultsList` is sized
|
||||||
|
|
@ -105,7 +105,7 @@ style = "dots"
|
||||||
show_empty = true
|
show_empty = true
|
||||||
# 0/1/2/3-or-more open windows → dot width in px
|
# 0/1/2/3-or-more open windows → dot width in px
|
||||||
# (`04-spotlight.html`'s `.dots button[data-n="N"]` rules).
|
# (`04-spotlight.html`'s `.dots button[data-n="N"]` rules).
|
||||||
dot_widths = [6, 10, 14, 18]
|
dot_widths = [8, 13, 17, 22]
|
||||||
|
|
||||||
[modules.clock]
|
[modules.clock]
|
||||||
# No clock label at all — `launcher_entry`'s placeholder IS the clock
|
# No clock label at all — `launcher_entry`'s placeholder IS the clock
|
||||||
|
|
|
||||||
|
|
@ -530,7 +530,9 @@ mod tests {
|
||||||
assert!(matches!(w.keyboard, Keyboard::None));
|
assert!(matches!(w.keyboard, Keyboard::None));
|
||||||
assert_eq!(w.layer, "top");
|
assert_eq!(w.layer, "top");
|
||||||
|
|
||||||
assert_eq!(theme.tokens().chip_height(), 32);
|
// 26, not breadbar's historical 32: the user approved a single 26px chip
|
||||||
|
// highlight height on the interactive reference (bos-ui-demos/proposed/).
|
||||||
|
assert_eq!(theme.tokens().chip_height(), 26);
|
||||||
assert_eq!(theme.tokens().icon_px(), 24);
|
assert_eq!(theme.tokens().icon_px(), 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -905,7 +907,7 @@ mod tests {
|
||||||
fn spotlight_workspaces_are_dots_with_the_demos_own_widths() {
|
fn spotlight_workspaces_are_dots_with_the_demos_own_widths() {
|
||||||
let theme = load_named(builtin::SPOTLIGHT_ID).expect("spotlight should resolve");
|
let theme = load_named(builtin::SPOTLIGHT_ID).expect("spotlight should resolve");
|
||||||
assert!(matches!(theme.modules().workspaces.style, WorkspaceStyle::Dots));
|
assert!(matches!(theme.modules().workspaces.style, WorkspaceStyle::Dots));
|
||||||
assert_eq!(theme.modules().workspaces.dot_widths, [6, 10, 14, 18]);
|
assert_eq!(theme.modules().workspaces.dot_widths, [8, 13, 17, 22]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue