breadman: rebuild settings with libadwaita components
Proof-of-concept for the ecosystem-wide design-system work: every setting
is now an AdwPreferencesGroup/SwitchRow/SpinRow/ActionRow/ComboRow via
bread-theme::adw, instead of a hand-rolled GtkGrid of labels + raw widgets.
This directly fixes the two worst defects a design critique found here:
- Toggle switches rendered ~1400px wide, like progress bars — caused by
GtkGrid sizing a switch's column to match a sibling entry's hexpand in
the same grid, and Switch has no default that resists filling that
width. AdwSwitchRow owns its own layout, so this class of bug can't
recur.
- Spin buttons were ~1300px from the label they modified, for the same
grid-column-sizing reason. AdwSpinRow docks the spinner to its title.
Also softened the jargon-forward section titles the critique flagged
("Model (Tier 2 ONNX)", "Ollama (Tier 3)") — the tier/implementation
detail moved from the title (loud, unavoidable) to each group's
description (quieter, still there for anyone who wants it).
bread-theme now needs a direct dependency here (branch=dev, `adw`
feature) since breadpad-shared's own bread-theme dependency is tag-pinned
to a release before this feature existed.
This commit is contained in:
parent
b8a37cbb85
commit
b85d682721
4 changed files with 189 additions and 143 deletions
|
|
@ -342,6 +342,10 @@ fn build_app_window(
|
|||
screenshot_req: Option<screenshot::ScreenshotRequest>,
|
||||
) -> Result<()> {
|
||||
apply_css(&cfg);
|
||||
// Needed once before constructing any adw:: widget (see views::settings) —
|
||||
// also forces dark mode, since bread-theme's palette is a fixed dark base
|
||||
// regardless of the system GTK preference.
|
||||
bread_theme::adw::init();
|
||||
|
||||
let store = Arc::new(Store::new()?);
|
||||
let notes = store.load_all()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue