spotlight workspace dots: bump height for legibility

04-spotlight.html's .dots button is 6px tall — reported as "too small
and hard to click." The click-target side of that is a separate,
non-visual fix elsewhere; this is the visual side only. 6px is also
genuinely hard to see on a real display, not just hard to hit, so
DOT_HEIGHT bumps it to 9px (bar::workspaces::make_dot_button) — enough
to read clearly without growing into a little chip that would fight
the capsule's minimal look. Widths are untouched: dot_widths is the
manifest's own per-occupancy encoding ([6, 10, 14, 18] in the builtin
spotlight theme.toml) and stays exactly as specified; only the height,
which has no manifest token of its own, is breadbar's call to make.
The CSS .workspace-dot min-height is updated to match (9px) so it
doesn't silently drift from the value that actually governs the
rendered size (a direct set_size_request, not normal CSS layout).

Not visually verified via capture — the isolated headless-Sway harness
has no Hyprland IPC, so workspace dots render empty there regardless
of theme (pre-existing harness limit, unrelated to this change).
Verified by reading the CSS/Rust against 04-spotlight.html's <style>
block instead, and by cargo build/clippy/test passing clean.
This commit is contained in:
Breadway 2026-08-25 21:16:36 +08:00
parent 583d73c53c
commit dd5618a5ea
2 changed files with 22 additions and 2 deletions

View file

@ -184,7 +184,19 @@ pub fn make_dot_button(
btn.set_halign(gtk4::Align::Center);
btn.set_vexpand(false);
btn.set_hexpand(false);
btn.set_size_request(dot_widths[dot_width_index(windows)], 6);
// Height is a deliberate departure from `04-spotlight.html`'s own 6px
// (see the demo's `.dots button { height: 6px }`): reported as "too
// small and hard to click" — the click-target enlargement is a
// separate, non-visual fix elsewhere, but 6px is also genuinely hard
// to *see* on a real display, not just hard to hit. 9px keeps the
// dots reading as slim pills rather than growing into little chips
// (which would fight the capsule's minimal, text-first look), while
// being clearly perceptible against the 36px-tall bar. Widths are left
// exactly as `dot_widths` (the manifest's own per-occupancy encoding,
// e.g. `[6, 10, 14, 18]`) specifies — only the height, which has no
// manifest token of its own, is breadbar's call to make.
const DOT_HEIGHT: i32 = 9;
btn.set_size_request(dot_widths[dot_width_index(windows)], DOT_HEIGHT);
btn.connect_clicked(move |_| {
relm4::spawn(async move {
switch_workspace(id).await;

View file

@ -180,9 +180,17 @@ fn load_css() -> String {
bread_theme::shell::WorkspaceStyle::Dots => {
let accent = theme.tokens().accent_from();
format!(
// 9px, not the demo's 6px — kept in sync with
// `bar::workspaces::make_dot_button`'s `DOT_HEIGHT` const,
// which is the value that actually governs the rendered
// size (a direct `set_size_request`, not CSS min-height
// participating in layout the normal way) — see that
// constant's own doc comment for why. This min-height
// exists mainly so the property isn't silently absent from
// the stylesheet a reader would expect to define it.
".workspace-dot {{ background-color: alpha(@on-bg, 0.35); color: transparent;\
border-radius: {radius_pill}; border: none; outline: none; box-shadow: none;\
min-height: 6px; margin: 0; padding: 0;\
min-height: 9px; margin: 0; padding: 0;\
transition: background-color 0.25s {spring_settle},\
opacity 0.25s {spring_settle}; }}\
.workspace-dot:hover {{ background-color: alpha(@on-bg, 0.55); }}\