bread-theme: differentiate liquid-motion/glass-workbench launcher geometry per approved demos
The two built-in launcher themes previously shared the same row radius, padding, icon treatment, and selection fill (only mode/width/top/radius/ icon_px were themed), so breadbox's overlay rendered as one launcher recoloured rather than two different instruments. Adds row_radius, row_inset, row_padding_v/h, icon_radius, search_font_size, search_padding_v/h, and selection_alpha to [launcher], all consumed by breadbox's build_css in the paired breadbox commit. Sets liquid-motion to the soft/roomy demo numbers (row radius 12, 28px icons, 22% selection alpha, Recent/Apps section headers) and glass-workbench to the dense/technical demo numbers (row radius 6, 22px icons, 28% selection alpha, flat list). Also wires up three previously-declared-but-unconsumed tokens (font_family, font_fallback, font_size_base) for breadbox's launcher panel specifically — scoped consumption, not the full ecosystem-wide font system replacement (breadbar/stylesheet() are unaffected). Updated the stale doc comments in types.rs/mod.rs and both theme.toml files to match, and updated the two existing launcher-geometry tests plus added a glass-workbench equivalent. Defaults for all new keys reproduce breadbox's pre-redesign hardcoded CSS values, so themes that don't set them (spotlight's capsule doesn't read any of this) are unaffected.
This commit is contained in:
parent
0ec20714c5
commit
3a22b62694
5 changed files with 202 additions and 76 deletions
|
|
@ -1,28 +1,31 @@
|
|||
# The compiled-in builtin theme (bread-theme/src/shell/builtin.rs). Describes
|
||||
# breadbar/breadbox AS THEY EXIST TODAY, not the 01-liquid-motion.html demo —
|
||||
# where the two disagree (bar side margin, launcher width/top, the two easing
|
||||
# curves), this file follows the current Rust source, since Phase 2's
|
||||
# acceptance test is pixel-identical rendering against today's bar.
|
||||
# The compiled-in builtin theme (bread-theme/src/shell/builtin.rs). The bar
|
||||
# side (workspaces/clock/chips/satellites) describes breadbar AS IT EXISTS
|
||||
# TODAY, not the 01-liquid-motion.html demo — where the two disagree (bar
|
||||
# side margin, the two easing curves), this file follows the current Rust
|
||||
# source, since Phase 2's acceptance test is pixel-identical rendering
|
||||
# against today's bar. The `[launcher]` table is the one exception: it now
|
||||
# follows bos-ui-demos/proposed/liquid-motion.html's `.bx` block (the
|
||||
# launcher-core redesign's spec) rather than breadbox's old, pre-redesign
|
||||
# hardcoded CSS — see that section's own note.
|
||||
#
|
||||
# Sources: breadbar/src/main.rs:16-22 (BAR_* / CHIP_HEIGHT / ICON_PX consts),
|
||||
# breadbar/src/theme.rs (load_css's radius/pad/spring locals and the actual
|
||||
# CSS selectors), breadbar/src/{panel,osd}.rs and
|
||||
# breadbar/src/notifications/{popup,history}.rs (satellite window anchors,
|
||||
# margins, namespaces), breadbox/breadbox/src/main.rs:341-346 (launcher
|
||||
# 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).
|
||||
# margins, namespaces), bos-ui-demos/proposed/liquid-motion.html (launcher),
|
||||
# ~/.config/hypr/scripts/ui/rules.lua (compositor rules).
|
||||
|
||||
name = "Liquid Motion"
|
||||
id = "liquid-motion"
|
||||
|
||||
[tokens]
|
||||
# Declared-but-not-yet-consumed: neither breadbar nor breadbox reads
|
||||
# font_family/font_fallback/font_size_base. Both get the font that actually
|
||||
# renders from bread_theme::stylesheet()'s own hardcoded FONT_FAMILY
|
||||
# constant — a separate, ecosystem-wide system shared by every bread GUI,
|
||||
# not this per-theme manifest. See Tokens::font_family's doc comment.
|
||||
font_family = "Varela Round, sans-serif"
|
||||
# font_family/font_fallback are now consumed, but only by breadbox's launcher
|
||||
# panel (breadbox::main::build_css's entry.search/row font-family) — see
|
||||
# Tokens::font_family's doc comment for the exact scope. breadbar's bar/chip/
|
||||
# clock text still comes from bread_theme::stylesheet()'s own hardcoded
|
||||
# FONT_FAMILY constant, unaffected by this key. font_size_base is likewise
|
||||
# now consumed for the launcher's row font-size only.
|
||||
font_family = "Outfit, sans-serif"
|
||||
font_fallback = "sans-serif"
|
||||
font_size_base = 14
|
||||
radius_bar = 16
|
||||
|
|
@ -100,35 +103,34 @@ format = "%H:%M"
|
|||
show_date = false
|
||||
|
||||
[launcher]
|
||||
# breadbox/breadbox/src/main.rs:341-344 sets vbox.set_margin_top(120) and
|
||||
# vbox.set_size_request(600, -1) — the demo's "540px overlay, 16% top" is a
|
||||
# design-doc approximation, not what the code does today.
|
||||
# Liquid Motion / Glass Workbench redesign (bos-ui-demos/proposed/
|
||||
# liquid-motion.html's `.bx` block is the spec): soft and roomy — a big
|
||||
# panel radius, generous row insets/padding, 28px icons, section headers,
|
||||
# and a translucent (not solid) accent selection fill. breadbox reads every
|
||||
# key below now; see main.rs's build_css for the consuming CSS.
|
||||
mode = "overlay"
|
||||
width = 600
|
||||
top = "120px"
|
||||
# .launcher-bg { border-radius: 8px } (build_css, main.rs:151) — corrected
|
||||
# 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.
|
||||
radius = 20
|
||||
icon_px = 28
|
||||
row_anim = "flip"
|
||||
rule = "gradient"
|
||||
footer = "count_apps"
|
||||
sections = false
|
||||
sections = true
|
||||
modes = ["apps"]
|
||||
# `.bx .r { border-radius: 12px; margin: 0 8px; padding: 10px 12px }`
|
||||
row_radius = 12
|
||||
row_inset = 8
|
||||
row_padding_v = 10
|
||||
row_padding_h = 12
|
||||
# `.bx .ico { border-radius: 9px }` (paired with icon_px = 28 above)
|
||||
icon_radius = 9
|
||||
# `.bx .q { padding: 16px 18px; font-size: 16px }`
|
||||
search_font_size = 16
|
||||
search_padding_v = 16
|
||||
search_padding_h = 18
|
||||
# `.bx .r.sel { background: rgba(accent, .22) }`
|
||||
selection_alpha = 0.22
|
||||
|
||||
# Keyed by layer-shell namespace, matching [compositor.*] below, so the two
|
||||
# tables share one keyspace and can be validated against each other.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue