FontSize helper follows desktop text scale

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 12:25:48 -04:00
1 parent 9c4d1f236f
commit 81bec044df
3 files changed
+22 -4

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ testdata/snapshots/ <os>/<name>-<light|dark>.png
- Signature: `func Name(c *ui.Context, value *T, opts NameOptions) *ui.Element`. Composites may return a named struct.
- Zero `Options` gives the default look. No `map[string]any` config.
- Explicit font sizes: `FontSize(c, theme.CaptionSize)`; it applies the desktop text scale.
- Colors: `k := mujica.Tokens(c)`. Metrics: `theme.*` consts and `Density(c).Unit()` / `.ControlHeight()`.
- Build on MyGo Bases (`ui.ButtonBase`, `ui.CheckboxBase`, `ui.SelectBase`, ...) or MyGo widgets restyled through the theme `Use` sets. Never reach into MyGo internals.
- Focus: `internal.Ring(e, k.Focus, radius)` for the 2 DIP ring with 2 DIP gap.