Skip to content

feat(theme): experiment with Systemless guest chrome - #1362

Merged
benletchford merged 12 commits into
masterfrom
dev/systemless-theme-experiment
Sep 4, 2026
Merged

feat(theme): experiment with Systemless guest chrome#1362
benletchford merged 12 commits into
masterfrom
dev/systemless-theme-experiment

Conversation

@benletchford

@benletchford benletchford commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • make systemless-default the normal 68K guest chrome in both the library runner and desktop command
  • keep classic-system7 available through --ui-theme classic-system7 for compatibility and original reference snapshots
  • use the Systemless logo palette (#15130f, #c9b183, #2794c4, #dff6ff) while preserving classic Macintosh window/control geometry and metrics
  • preserve theme colors when architecture-neutral bitmaps are blitted into indexed 68K framebuffers
  • cover desktop dithering, window title chrome, controls, scrollbars, menus, dialogs, window stacking, resizing, and repaint behavior
  • simplify modal and alert frames to one dark outline so blue is reserved for focus and default-action emphasis
  • color every title-bar pinstripe consistently, including short runs beside window controls
  • give default buttons a three-pixel blue emphasis ring with the classic one-pixel separator
  • fully fill tracked menu rows in blue, reverse their content for contrast, and preserve complete pane borders
  • replace ambiguous scrollbar diamonds with directional arrows and use logo blue for resting thumbs
  • add a deterministic, losslessly optimized 43-frame Toolbox Showcase theme gallery

The themed presentation currently targets the 68K HLE chrome. Native PowerPC guest chrome remains classic until the shared provider is threaded through that adapter.

Visual review

Browse all 43 themed Toolbox Showcase frames

Windows and z-order Controls and scrollbar Dialog Popup tracking
Themed overlapping windows Themed controls Themed modal dialog Themed popup tracking

Verification

  • cargo check --lib --bin systemless
  • cargo test --lib --features test-support — 4,915 passed, 3 ignored
  • cargo test --bin systemless cli_ — 8 passed
  • cargo test --locked --test toolbox_showcase — classic 68K 43-frame baseline
  • SYSTEMLESS_PREFER_POWERPC=1 cargo test --locked --test toolbox_showcase — classic PowerPC gallery
  • SYSTEMLESS_TOOLBOX_THEME=systemless-default cargo test --locked --test toolbox_showcase — Systemless 43-frame gallery

Closes #1361

@benletchford
benletchford marked this pull request as ready for review September 4, 2026 21:28
@benletchford
benletchford merged commit 305027d into master Sep 4, 2026
4 checks passed
@rlanday

rlanday commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Heads-up: while re-baselining perf work against current master we found a host-work regression that traces to the themed chrome, and we will send a fix.

With the default systemless-default theme, the per-frame chrome redraw re-renders theme bitmaps and blits them every host frame: on a 3 in Three headless replay (200 M guest instructions, sample at 1 ms) blit_theme_bitmap_mono_masked under draw_theme_dialog_frame is 7.5% of self time and blit_theme_bitmap_mono under draw_menu_bar_to_fb / draw_theme_menu_title_chrome another 4.1%, so about 12% of the run goes to redrawing chrome that did not change (draw_theme_dialog_frame allocates a fresh ThemeBitmap and draws the frame each call). --ui-theme classic-system7 does not pay this. The fix we have in mind is to render each themed frame once per (rect, proc id, active, theme) and blit only when the chrome is actually dirty, keeping pixel output identical; numbers with the fix will follow in its PR.

@rlanday

rlanday commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Follow-up: the fix is #1421. Themed dialog frames, the menu bar and menu titles are rendered once per distinct input and replayed from resolved device pixel indices; pixel output is identical (the paired replays check the framebuffer hash on every pair). Bisect put this PR at +40 B host instructions on the 3 in Three replay (268.0 B → 308.6 B); #1421's two steps measure −17.8% (with #1420) and −4.9% on that replay, and −14.6% and −9.0% on SimCity 2000. All regression fixes together (#1419, #1420, #1421 on top of #1220): −53.0% CPU time on 3 in Three, −30.8% on SimCity 2000, machine idle.

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.

feat(theme): experiment with Systemless guest chrome

2 participants