Files
lightcraft/docs
Nathaniel LedfordandClaude Opus 5.5 d0a9ca09dd Buttons: one component with kinds, sizes and icons
Buttons were egui's plain one, a fill set by hand where one had to stand out (a dialog's confirm,
About's Discord link), with no hover or press shade on a filled one and no shared sizes.

- `crate::button::Button`: what it is for (`Kind`: Primary filled with the accent, Secondary
  with a neutral fill and a border, Danger filled red, Ghost with no fill until hovered), how
  big (`Size`: Small 24, Medium 30, Large 36 points, each with its padding, text and icon size),
  and what it shows (text, an icon before the text, or an icon alone, which takes a name for
  screen readers and its tooltip).
- Hover and press darken it; disabled (or in a disabled part of the window) fades it and takes
  no click, its tooltip or name still shown; a focused one shows an accent ring. A filled kind's
  fill is darkened as little as needed for white to read at 4.5:1 (the light themes' accent and
  the red would be too pale), in every state. Drawn within its own rectangle.
- Named for screen readers, registered for scripts and tests (`.widget(id)`). Its egui id comes
  from the widget id (salted with `.id_salt`, e.g. the dialog's kind, so the keyboard's place
  doesn't carry from one dialog to the next) or from its place in the ui, moved on so buttons
  with the same text side by side stay apart.
- Dialogs' footers (Cancel, the confirm; at least 72 points wide) and About's Discord link use
  it. The Export dialog's expected height in `tests_dialog_fit` grows by the 8 points of its
  footer's 30-point buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:57:58 -04:00
..
2026-10-13 11:05:53 +07:00
2026-10-13 11:02:58 +07:00
2026-10-13 11:05:47 +07:00
2026-10-14 01:27:32 -04:00
2026-10-13 02:05:14 -04:00
2026-10-13 11:01:54 +07:00
2026-10-08 20:20:17 +00:00
2026-10-09 20:56:56 -04:00
2026-10-14 01:40:32 -04:00
2026-10-11 12:03:53 +00:00
2026-10-14 01:54:50 -04:00
2026-10-14 01:29:30 -04:00
2026-10-11 12:40:55 +00:00
2026-10-13 11:01:49 +07:00