Skip to content

refactor(arca-gui): derive view font sizes from the body text size - #69

Merged
devin-ai-integration[bot] merged 2 commits into
mainfrom
devin/1792271625-text-size-fonts
Oct 18, 2026
Merged

devin-ai-integration[bot] merged 2 commits into
mainfrom
devin/1792271625-text-size-fonts

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

theme::install sets TextStyle::Body from settings.text_size, but about 30 text sites in arca-gui/src/ui/ used fixed sizes such as FontId::proportional(14.0) or .size(12.0). That covered browser row names, column headers and cells, peek cards, dialogs, settings rows, the status bar notice and key caps. Because of that, the Text size setting never changed them.

New helpers in theme.rs take the installed Body size and add an offset to it:

text_size(style, delta) -> f32    // Body.size + delta
text_font(style, delta) -> FontId // proportional
mono_font(style, delta) -> FontId // monospace

Each literal now uses one of these with delta = literal - 13 (13 is TEXT_DEFAULT), e.g. FontId::proportional(14.0) → text_font(ui.style(), 1.0). At the default size every font comes out the same as before, so the default look doesn't change.

What stays fixed on purpose: Phosphor icon glyph sizes (icon_font(..)/icon_text(..).size(..)), the stepper's −/+ signs, and the test fixtures in highlight.rs. They sit inside fixed geometry (24/30 px rows, a 26 px text offset after the row glyph, fixed button sizes). Scaling them would mean reworking that layout, which this PR doesn't do.

Tests: added view_text_follows_the_text_size_setting (theme.rs). It runs install at the default size and at 18 pt for both themes and checks the derived sizes. cargo clippy -p arca-gui --all-targets -D warnings and cargo test -p arca-gui pass. I also ran it by hand at text_size = 20: 21 px row names still fit in the Compact 24 px rows.

text_size = 20

Link to Devin session: https://app.devin.ai/sessions/0f38f47b919e4d97a58d909cf30be015
Open in Devin Desktop: https://app.devin.ai/desktop/session/0f38f47b919e4d97a58d909cf30be015?variant=devin
Requested by: @Villoh

Browser rows, column headers, dialogs and settings rows drew text with
literal sizes, so the Text size setting never reached them. The new
theme::text_size/text_font/mono_font helpers offset the installed Body
size; at the default 13 pt every size equals the old literal.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

…-size-fonts

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	arca-gui/src/ui/dialogs.rs
#	arca-gui/src/ui/pathbar.rs
@devin-ai-integration
devin-ai-integration Bot merged commit c589c1f into main Oct 18, 2026
5 checks passed
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