makepad/widgets/themes
Admin e94e15f429 draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor
makepad-widgets becomes a front crate over widgets/core and widgets/families (each family a crate of its own, linked by features, so an app compiles only the families it uses); widgets/feedback is the Send feedback panel. The dev PRs (#1241-#1264) are ported to the new layout, as in the merge of dev into work.

Covers work 6f1e44649..2b1a41df4 for draw widgets xr code_editor:

- widgets, storybook: the widget catalogue app, some eighty new widgets, a theme store with mixable style sheets, and the rule that a press belongs to
- wm, widgets: the style tween starts with all eight weights, and the new style sheet takes the last number instead of macOS's
- platform: the Android desk swipes at 120 Hz — offscreen render passes and framebuffers cached, SVG meshes kept, font families that complete
- Button: activate from the keyboard when focused (#1241)
- app_main!: only ship the fonts an app declares (#1247)
- platform, widgets, wm: every Vulkan pass renders through a negative-height viewport again, so a Wayland or X11 window stands upright, and no capture
- widgets: the supersampled resolve and the map's shadow mask sample their textures as stored, like every other render texture
- widgets, platform: the last twelve warnings go
- cef, video, platform: what Stage's browser needs from the shared layers
- apps: what the CI box found
- ScrollBar: add `show_handle` for a view that scrolls without a grabbable bar (#1254)
- widgets: children a lookup discovers reach the dump, the snapshot and the flood searches
- tests: the workspace suite, run as a whole for the first time, passes outside the example UI tests
- examples: the UI tests pass, for the reasons they failed
- libs: no warnings in the workspace check on any row
- tests: the last three failures of the CI box's night
- Linux: fix window chrome button hovers and how maximized/fullscreen windows work (#1255)
- Tooltip: position anchored tooltips in the same draw (#1256)
- tests: the three binaries over ten seconds in release come under it
- widgets: let the host install script mods into every Splash isolate
- widgets: a pooled test context forgets the last case's Escape claim
- widgets: the pooled test context's resets replace the globals
- RadioButton: fix its touch hover state and click-off behavior (#1258)
- HtmlLink: fix its hover and pressed states (#1257)
- RadioButton: take key focus on the click, not on the press (#1259)
- feat(text): CoreText outline fallback for hvgl-only fonts (macOS)
- draw text: the CoreText outline fallback is only ever resolved for a face whose outlines live solely in hvgl, and font-family diagnostics are the `f
- platform, widgets, wm: a touch that is taken away is cancelled, never released
- wm on Android: every app is its own process
- widgets: touch lists scroll with Android's physics
- task, cargo-makepad, widgets, audio: the task manager chooses its columns, graphs every process' network and disk traffic and installs itself as a D
- widgets, draw: skeuomorphic surfaces light each other through an optional relief buffer
- widgets, platform: a texture can light the relief buffer, menus take colour chips, and a style reload recompiles changed shader functions
- widgets: relief surfaces can travel like mechanical keys, and dark surfaces take less neighbour light
- platform, widgets, audio_route, ai: window crossfades and whole-frame presents, caption controls that click, themed menus, a stereo-pair audio tap,
- platform, widgets, ai: a restyle recompiles nothing it already has, shows only complete frames, and a window can own its caption
- widgets: relief surfaces can swing their light toward a point
- widgets, builder: the big widget families are features, all on by default, and the Builder takes none of them
- ai: Claude Desktop drives any app with the F10 panel
- Constrain Splash external I/O to the host service bridge (#1243)
- PortalList: stop following the end when scrolling to an earlier item (#1261)
- draw: glass of a view that stopped drawing leaves the screen
- widgets: the Widget lookup methods and with_script_vm_id are compiled once, not once per widget type
- widgets: the library moves to makepad-widgets-core in widgets/core, and makepad-widgets becomes its front crate
- widgets: the Window, widget tree and panel theme reach the tweaker, voice, AI slot and dock through hooks, not through their modules
- widgets: every widget family is a crate of its own under widgets/families, and makepad-widgets links, re-exports and registers the ones its features
- aichat, widgets: the chat reads the design feedback through the tweaker's hook, so linking the chat no longer needs the tweaker
- apps, examples, libs: each crate builds only the widget families it uses, and the design overlay is each app's own default feature
- widgets: the build scripts rerun on their own edits only, and makepad-widgets no longer reads MAKEPAD
- feedback: Send feedback, a caption icon and a small panel that shows exactly what is sent
- feedback: the panel's wording reads right and draws in any font
- feedback: takes makepad-widgets without its default families
- widgets: the empty parts of an app's caption bar drag the window again
- ScrollBar: fade out when idle, like macOS overlay scrollers (#1264)
- platform, draw: web builds start again
- widgets: the keyboard reaches boxes and modals
- widgets: a hover tooltip never sits under the mouse cursor
- feedback: Send clipboard, and the dialog works from the keyboard

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 20:10:50 +02:00
..
android draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00
android-dark draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00
black-orange draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00
ios platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
ios-dark platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
macos platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
macos-dark platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
nextstep draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00
omarchy platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
windows platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
windows-2000 draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00
windows-dark platform: retained draw lists, shared publications and GPU residency (DL-0..DL-5) 2026-09-15 13:40:23 +02:00
build_icons.py widgets: glass, dock, tweaker, themes, code_editor, phone shell 2026-09-15 13:38:48 +02:00
README.md draw, widgets: the library is makepad-widgets-core plus a crate per widget family, eighty new widgets and the storybook, relief-lit skeuomorphic surfaces, the feedback panel, keyboard focus and tooltips clear of the cursor 2026-09-26 20:10:50 +02:00

Application styles

These Splash files define the shared widget styles used by the window manager: omarchy, macos, macos-dark, windows, windows-dark, windows-2000, nextstep, ios, ios-dark, android, and android-dark.

Each style has two phases:

  • theme.splash installs semantic roles, typography, spacing, radii, and bevels before stock widgets are registered.
  • widgets.splash applies component geometry and materials after registration. It can replace a widget's shader as well as its properties. Windows 2000's raised buttons and sunken edit fields are examples.

The loader embeds both files for installed/wasm builds. In a native source checkout it reads widgets/themes/<style>/ on each selection. Edit either file and choose the same style again from the WM's style picker to hotload it. End a generated assignment-only Splash module with true so its last assignment is evaluated as a statement.

The WM keeps its Omarchy top bar. Click the current style name to open the dropdown. Modern desktop and mobile styles also have a Light/Dark button. Its Applications launcher, Windows Start menus, window chrome, and hosted apps use the selected appearance.

desktop_style::StyleSheet carries both phases to existing process clients through StudioToApp::Custom. Window receives the message and requests an application Splash reload with Apply::ScriptReapply. Module clients re-evaluate their registrations in their existing isolates with the same apply mode. Widget identities, editable text, and application Rust state are retained. Initialize persistent script models only when !vm.is_reload(); read the existing mod.state from application Splash. See examples/counter/src/main.rs. Dynamic View.on_render children and embedded Splash isolates reapply the style too. Embedded Splash widgets inherit the stylesheet and reapply their existing widget tree in their own isolate.

Applications should inherit the stock component styles and read theme.* for custom drawing. Apps using the older WM palette adapter can read makepad_wm_theme::current_for_vm during registration, or from their owning VM through Cx::with_vm. Avoid process-wide immutable palette caches: appearances can change while an app is open. Explicit app overrides still take precedence.

The framebuffer crossfade lives in apps/wm/src/scene.rs. It freezes the old GPU render target while the live scene renders the new style; it does not take screenshots, rebuild app instances, or put transitions in the widget system. Shell geometry interpolates over the same 650 ms interval. Floating desktop rectangles are stored separately from the Omarchy tiling tree, so switching back restores the tiling arrangement.

The macOS dock overlays the desktop; dragging keeps the title bar reachable but allows window bodies behind the dock or partly offscreen. Terminals render only their background with opacity (MAKEPAD_WM_TERM_OPACITY, default 0.78 0.70 for focused/unfocused); text and ANSI cell colors remain crisp. Their foreground and background follow the active light/dark stylesheet without restarting the PTY. color_terminal_bg and color_terminal_text are separate semantic roles: Windows 2000 and Android use opaque black consoles, while NeXTSTEP uses white. The palette adapter exports them as term.background and term.foreground. Declare both in each style so a reload resets the previous console palette. The terminal opts into Window.body.keyboard_resize: true; this KeyboardView mode reflows content above the animated keyboard instead of panning the whole terminal out of view. Its grid and PTY resize with the available space.

widgets/core/src/backdrop.rs supplies ordered compositor checkpoints. Windows are composited from back to front, and a glass surface samples a checkpoint below it. Disjoint sampling footprints share a Gaussian stack, including the kernel's support outside the visible surface. Intervening opaque or translucent content that overlaps the footprint starts a new checkpoint. The dock is the final consumer. Requested blur levels are combined before drawing the pyramid, so unused deeper passes are skipped. Explicit producer/consumer links preserve GPU ordering when pass IDs are recycled. MAKEPAD_WM_TRACE_BLUR=1 logs stack and pass counts when they change; normal operation does not log each frame.

In a checkout, build with cargo build --release -p makepad-wm, then launch ./target/release/wm --remote from the checkout root. Applications launch on demand with cargo run --release -p <package>; there is no binary collection to prepare. The app's window shows Cargo's compiling or build-wait stage before the process connects, then fades into its first frame. Installed distributions without a source checkout use sibling executables.

NeXTSTEP uses black focused title bars, gray beveled window controls, square widgets, a right-hand vertical application dock, and its own icon family. Its launcher opens a draggable Workspace palette with attached submenu columns. Hold the secondary mouse button on the desktop or a window title bar, drag through the menu and release to choose a command. The popup follows the pointer and opens submenus to the left near the screen edge. The Omarchy top bar and shared application state remain in place while switching styles.

Application icons use AppIcon{name: "files" width: 32 height: 32}. The default style: "auto" follows the application's Splash stylesheet; standalone apps use the host OS family. An explicit style ID is available for galleries. color retints the Omarchy artwork; opacity preserves the other families' own colors. Window captions derive their icon name from window.app_id (or the binary name), and the WM's dock/taskbar/launcher use the same AppIconDraw renderer.

Each family has editable icons/<app-id>.svg assets. macOS dark and light share app artwork, as on the OS. Unknown IDs use that family's app.svg. Add or edit an SVG and reselect the style to hotload it; the complete icon sources travel in the stylesheet to existing process and module apps. Unchanged sources keep their parsed geometry cache. python3 widgets/themes/build_icons.py rebuilds the bundled artwork families using only Python's standard library.

Use original application symbols within each OS's visual style. Files uses a folder with documents, and Browser uses a web window with a globe; do not use the Finder face or Safari compass artwork.

Application surfaces should use the shared theme roles (or app-specific aliases that resolve to those roles), including corner_radius and container_corner_radius. Keep content colors such as chart series and model axes separate. Filled accent actions use color_text_on_accent.

Mark live fields that contain runtime UI state with #[apply_state] alongside #[live]: stylesheet ScriptReapply preserves these values, while explicit Eval edits and ordinary source reloads still apply. Standard panel visibility, checkbox state, and dropdown selection use this path.

On macOS, the WM captures the complete window into a GPU texture and warps that surface into its application icon in the dock. Minimize and restore share the same reversible progress, without resizing or relaying out the application during the animation. A style change invalidates minimized snapshots so the restored window uses the current theme. MAKEPAD_WM_TRACE_WARP=1 enables the capture diagnostics using ordinary logs. For frame inspection, MAKEPAD_WM_WARP_SECONDS=5 slows the default 0.62-second animation.