breadman: rebuild settings as plain GTK4, fix AdwDialog sizing, present-ordering bug
The libadwaita-based settings screen (previous commit) had two real bugs a closer look (and a screenshot from the real running app) caught: - AdwSpinRow's internal GtkSpinButton has no width constraint of its own, so once the row was widened to 900px, the spin button stretched to fill it - the digits and +/- buttons ended up stranded behind a huge empty bordered box, the exact bug the design review flagged, just worse. - bread-theme's shared `entry, spinbutton` rule outlines every field with an always-visible @overlay border, which on a light-cream overlay colour reads as a stark white outline against the dark theme. Rather than keep fighting libadwaita's internal row/spin-button opinions (there's no supported way to reach in and constrain them), settings.rs is now plain GTK4 mirroring bos-settings' own Row.svelte/NumberField.svelte/ TextField.svelte design exactly: same tokens (12/16px row padding, ch-width inputs, transparent-at-rest border, accent border only on focus), built on a plain `list.boxed-list` for the native rounded-corner-run + divider styling. Full control over sizing, no internal widget to hunt for. Also fixed a real ordering bug in the editor AdwDialog conversion: `open_editor` used to call `dialog.present()` internally before returning, so callers that connected `dialog.connect_map` afterward (screenshot mode) missed the signal entirely - it can fire synchronously inside `present`. Presentation now happens at each call site, after wiring `connect_map`. Also gave the dialog's content an explicit height/vexpand + min-content- height, since the ScrolledWindow had none and the whole dialog was collapsing to just its header bar. breadpad-shared's bread-theme dependency also gets fixed here: it was still pinned to an old GitHub-mirror tag (v0.2.8) while breadman pinned the same crate to git.breadway.dev's dev branch - two different copies of bread-theme compiled into the same binary, so breadman's actual runtime CSS (built through breadpad_shared::theme) never saw any of the shared stylesheet fixes above regardless of what breadman's own direct dependency resolved to.
This commit is contained in:
parent
26cb31354f
commit
ae296c7154
7 changed files with 230 additions and 190 deletions
|
|
@ -28,6 +28,27 @@ pub fn build_css(palette: &Palette, user_css: Option<&str>) -> String {
|
|||
/* breadpad/breadman-specific components */
|
||||
window { border-radius: 8px; }
|
||||
|
||||
/* breadman/views/settings.rs — matches bos-settings' Row.svelte/
|
||||
NumberField.svelte/TextField.svelte exactly (same design tokens: 12/16px
|
||||
row padding, transparent-at-rest input border, ch-width inputs) rather
|
||||
than libadwaita's own AdwActionRow/AdwSpinRow padding and internal
|
||||
spin-button sizing, which run noticeably taller/wider and don't expose a
|
||||
way to constrain from the outside. `list.boxed-list` already gets its
|
||||
surface fill + radius from the shared stylesheet; this only adds the
|
||||
compact row padding and the divider between rows. */
|
||||
list.boxed-list row.field-row { padding: 12px 16px; min-height: 0; }
|
||||
list.boxed-list row.field-row:not(:last-child) { border-bottom: 1px solid alpha(@on-surface, 0.08); }
|
||||
.field-row-subtitle { opacity: 0.6; font-size: 12px; }
|
||||
|
||||
.field-input {
|
||||
background-color: @bg;
|
||||
color: @on-surface;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.field-input:focus-within { border-color: @accent; outline: none; }
|
||||
|
||||
.popup-entry {
|
||||
background: @bg;
|
||||
color: @fg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue