feat(theme): rebuild the XP theme — Luna chrome, face and Start panel - #8
Draft
doodlewind wants to merge 2 commits into
Draft
feat(theme): rebuild the XP theme — Luna chrome, face and Start panel#8doodlewind wants to merge 2 commits into
doodlewind wants to merge 2 commits into
Conversation
Every raised Luna surface is a gel: a bright two-pixel crown, a dark plateau, a lifting seat and a dark closing line. Three gradient stops cannot hold that shape, so the XP theme painted flat approximations — rounded window bottoms, a start button with no crown, menus outlined in one blue line. The theme boundary now also carries paint-only layer tables: absolutely positioned strips the chrome renders before a surface's content. Two of them make corner-selective rounding the single `radius` prop cannot: a rounded cap over a square body gives windows Luna's rounded top and square bottom, and the Start button's rounded body overhangs its overflow-hidden container so it meets the screen edge square. Classic returns empty tables everywhere and renders byte-identically. Chrome rebuilt against colors sampled from a 96dpi Luna capture: - window frame: 1px outer border, 2px band, 1px light client ring, the caption edge-to-edge under the border (new `captionTop` metric), a drop shadow, and square corners while maximized - caption: crown, plateau, seat and two closing lines; 21px gel controls with a white ring, an inner rim and 10px glyphs on a 16px tile - taskbar: dark top line, 4px crown, seated bottom; gel task buttons; the notification area with its own cyan gradient and divider - Start button: green gel with a translucent crown that keeps the button's own corner radius - menus and the Start panel: white with Luna's #aca899 border, #316ac5 highlights, single separators and a drop shadow - desktop: sky gradient with a grass band fading in over it Verified against docs/xp-theme.png, the sim harness and the native gpui host; docs/classic-theme.png is unchanged.
Four things still read as Windows 98 wearing Luna's colors: the caption marks were pixel grids that stair-stepped at 2x, the Start button carried the Pocket mark, every string was the W95FA bitmap face, and the Start menu was a 98 rail with a green stripe. Caption glyphs are drawn instead of gridded — filled quads and rects in a 16px tile, so the close mark's diagonals carry analytic coverage. The screenshot capture now bakes its pak at density 2 like the macOS plan does, so `docs/*.png` stop showing 1x art upscaled (Classic's snapped W95FA is unchanged by that; only its 16px icons sharpen). Luna's own Tahoma and Trebuchet MS cannot be redistributed, so the theme bakes the vendored Inter (OFL) into two new slots and keeps its coverage instead of thresholding it the way the bitmap face needs. A theme now maps text roles onto slots (`fontSlot`), which UiText, `measure` and the wrap helpers all read, so a switch reflows every string; menu-bar hit widths are re-measured in the incoming face. spec.ts caps the atlas at 24 slots and Classic holds three, so Luna's `xl` role lands on its bold face. The Start button drops its mark for Luna and opens the XP panel: user header, a programs column with All Programs pinned at its foot, a places column, and Turn Off Computer in the strip along the bottom. Both panels come out of one pure layout (`wm.ts startLayout`) driven by Start metrics — Classic sets its header and footer to zero and gets its rail back — so paint and hit testing cannot drift apart, and the flyouts anchor off the same row rectangles. Verified with `bun run check`, `bun run capture` and the native gpui host.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #6 (closed). The
xptheme painted flat approximations of Luna andkept Windows 98's bones underneath. Every raised Luna surface is a gel — a
bright two-pixel crown, a dark plateau, a lifting seat, a dark closing line —
and three gradient stops cannot hold that shape.
Chrome. The theme boundary now also carries paint-only layer tables:
absolutely positioned strips the chrome renders before a surface's content. Two
of them buy corner-selective rounding the single
radiusprop cannot express —a rounded cap over a square body gives windows Luna's rounded top and square
bottom, and the Start button's rounded body overhangs its
overflow-hiddencontainer so it meets the screen edge square. Colors are sampled from a 96dpi
Luna capture, row by row: window frame (1px border, 2px band, 1px light client
ring, caption edge to edge under the border, drop shadow, square corners while
maximized), caption crown/plateau/seat, 21px gel controls, taskbar crown and
seat, gel task buttons, the notification area's own cyan gradient, menus in
Luna's
#aca899and#316ac5, and a desktop of sky with a grass band fadingin over it.
Caption glyphs. Drawn instead of gridded — filled quads and rects in a 16px
tile, so the close mark's diagonals carry analytic coverage instead of
stair-stepping. The screenshot capture also bakes its pak at density 2 like the
macOS plan does, so
docs/*.pngstop showing 1x art upscaled.Face. Luna's Tahoma and Trebuchet MS are Microsoft's, so the theme bakes the
vendored Inter (OFL, attributed in
THIRD_PARTY.md) into two new atlas slotsand keeps its coverage instead of thresholding it the way the W95FA bitmap face
needs. A theme maps text roles onto slots (
fontSlot), read byUiText,measureand the wrap helpers, so a switch reflows every string; menu-bar hitwidths are re-measured in the incoming face.
spec.tscaps the atlas at 24slots and Classic holds three, so Luna's
xlrole lands on its bold face.Start panel. The button drops its mark for Luna and opens the XP panel: user
header, a programs column with All Programs pinned at its foot, a places column,
and Turn Off Computer in the bottom strip. Both panels come out of one pure
layout (
wm.ts startLayout) driven by Start metrics — Classic sets its headerand footer to zero and gets its rail back — so paint and hit testing cannot
drift apart, and flyouts anchor off the same row rectangles.
Validation
bun run check(typecheck, 50 unit, 4 sim, 3 wrap)bun run capture; Classic's render is unchanged apart from its 16px iconssharpening at the new capture density
capture row by row
bun run macos), not only the simulator🤖 Generated with Claude Code