Skip to content

fix(wbconf): pre-select current font in pickers; add Reset split button#72

Merged
ebenali merged 2 commits into
masterfrom
fix-wbconf-fonts-reset
Jun 21, 2026
Merged

fix(wbconf): pre-select current font in pickers; add Reset split button#72
ebenali merged 2 commits into
masterfrom
fix-wbconf-fonts-reset

Conversation

@ebenali

@ebenali ebenali commented Jun 21, 2026

Copy link
Copy Markdown
Member

Two wbconf UX fixes from your feedback.

Font pickers didn't pre-select the current font

The font buttons were only given a font when rc.xml had that place set; for unset places the button was empty, so the picker opened with nothing selected — you couldn't just scale the size down. (The "selects itself after a delay" was GTK's async font-list loading finishing on an empty selection.)

Fix: seed each button with the effective default (Sans 10) when unset, so the dialog opens with the current font pre-selected. To avoid writing that seeded default into rc.xml, Save now remembers the loaded settings and only persists a font you actually changed (an untouched default-seeded place is left out).

Reset control (split button)

Added a Reset control next to Close / Save & Apply — a split button: the main part resets the current page to defaults, and the dropdown arrow opens a menu with "Reset This Page" and "Reset All to Defaults". (GTK core has no split-button widget, so it's a linked button + menu button with a popover.) Reset only updates the widgets; nothing is written until Save & Apply.

Testing

  • Full suite 27 green; clang + release clean.
  • wbconf maps with the pickers pre-selected and the reset split button, no GTK/Cairo errors.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

ebenali and others added 2 commits June 21, 2026 17:58
…utton

Two wbconf UX fixes.

- The font pickers were left empty for any place not present in rc.xml, so the
  font dialog opened with nothing selected and you couldn't just tweak the size.
  Seed each button with the effective default (Sans 10) when unset so the dialog
  pre-selects the current font. To avoid persisting that seeded default, the Save
  path now remembers the loaded settings and only writes a font the user actually
  changed (an untouched default-seeded place is left out of rc.xml).

- Add a Reset control next to Close / Save & Apply: a split button whose main
  part resets the current page to defaults and whose dropdown offers "Reset This
  Page" and "Reset All to Defaults". (GTK core has no split-button widget, so it
  is a linked button + menu button with a popover.) Reset only updates the
  widgets; nothing is written until Save & Apply.

Verified: full suite 27 green; clang + release clean; wbconf maps with the
pickers pre-selected and the reset button, no GTK/Cairo errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The GtkFontDialogButton opened GTK's font chooser, which loads its font list
asynchronously and only highlights/scrolls to the current font after a
multi-second delay — so the currently-used font appeared unselected until you
waited or scrolled. Seeding the button's font-desc did not change this; it is
GTK's font-chooser internals.

Replace it with a lightweight custom picker per place: a searchable family
drop-down + a size spin button + a bold toggle, built from the Pango font map.
It is plain widgets, so the current family/size/bold are shown immediately and
you can just scale the size down. Reading/writing still uses the Pango
"Family [Bold] Size" convention, so RcDocument and the change-detection are
unchanged; the live preview updates on family/size/bold changes.

Verified: full suite 27 green; clang + release clean; wbconf maps with the new
pickers and no GTK/Pango errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ebenali
ebenali merged commit 14d0cd8 into master Jun 21, 2026
4 checks passed
@ebenali
ebenali deleted the fix-wbconf-fonts-reset branch June 21, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant