Skip to content

feat(ui): per-widget button colors + hover/pressed shades (#566, first slice of #594)#596

Merged
InauguralPhysicist merged 1 commit into
mainfrom
feat/ui-button-colors
Jul 14, 2026
Merged

feat(ui): per-widget button colors + hover/pressed shades (#566, first slice of #594)#596
InauguralPhysicist merged 1 commit into
mainfrom
feat/ui-button-colors

Conversation

@InauguralPhysicist

Copy link
Copy Markdown
Collaborator

What

First slice of #594 (modern widget chrome), prioritizing #566 per the DeslanStudio side-by-side.

Tests

test_ui.eigs renders a custom-colored button through rest/hover/pressed/disabled and asserts the overrides survive; section [63] is now 118 checks.

Gates (local, this branch)

  • release suite: 2866/2866
  • ASan+UBSan detect_leaks=1: 2870/2870, leak tally 0
  • gfx-build suite: 2907/2907 (incl. [63]=118, [120])
  • lint: only pre-existing W002s in ui_w_button (registry handler signatures)

Visual proof

Real-X-display render kept at /tmp/claude-1000/btn-proof.png: Stop (white) / Play (green) / Record (red, shown hover-shaded) / Theme (unchanged theme gray), rounded + antialiased TTF labels from #595.

Closes #566

Remaining #594 items (hover feedback on checkbox/toggle) stay open on #594.

🤖 Generated with Claude Code

…e of #594)

_render_button honors optional bg / text_color fields on the button
dict with theme fallback — the toggle_button (color_on/color_off) and
label (color) pattern — so semantic coloring works: the record-red /
play-green transport buttons DeslanStudio dropped (PORTING.md F-DS-12)
now render.

Custom-colored buttons get hover/pressed feedback via new theme
hover_shade / pressed_shade alpha overlays drawn over the custom bg
(a theme-color swap would erase the color). Theme-colored buttons keep
the exact btn_hover/btn_pressed swap — existing apps render unchanged.
set_theme replaces the theme dict wholesale, so custom themes without
the new keys degrade gracefully (null shade = no overlay). All three
built-in themes gain tuned shades.

Docs: gfx_rrect and gfx_clip were registered but absent from
BUILTINS.md (the #393 undiscoverability class — downstream kept
believing there is no rounded-rect primitive); rows added.

Tests: test_ui renders a custom-colored button through every state
(rest/hover/pressed/disabled) and asserts the overrides survive;
[63] is now 118 checks.

Gates: release 2866/2866; ASan+UBSan detect_leaks=1 2870/2870 (tally
0); gfx-build suite 2907/2907. Visual proof on the real X display:
Stop/Play/Record/Theme row with the Record button hover-shaded.

Closes #566

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@InauguralPhysicist InauguralPhysicist merged commit 872e9b3 into main Jul 14, 2026
17 checks passed
@InauguralPhysicist InauguralPhysicist deleted the feat/ui-button-colors branch July 14, 2026 01:24
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.

lib/ui: button has no per-widget color overrides — transport-style color-coded buttons impossible

1 participant