Summary
Near-term modernization of the existing Win32/GDI Windows backend (crates/perry-ui-windows) so default Windows apps stop looking Win7-era — without waiting on the full WinUI backend (#4680).
From discussion #3486. Most of the "40-year-old" look is fixable on the current path with DWM attributes + finishing already-stubbed styling, no new backend required.
Tasks
1. DWM modern window chrome (Win11)
Currently none of these are used (only app.rs touches dark mode). Add to window.rs window creation:
DWMWA_USE_IMMERSIVE_DARK_MODE — dark titlebar following system/app theme.
DWMWA_WINDOW_CORNER_PREFERENCE (DWMWCP_ROUND) — rounded corners.
DWMWA_SYSTEMBACKDROP_TYPE (DWMSBT_MAINWINDOW / Mica, DWMSBT_TRANSIENTWINDOW / Acrylic) — Mica/Acrylic backdrop.
- Graceful no-op on older Windows (attributes are version-gated; ignore
E_INVALIDARG).
2. Finish stubbed styling apply paths
geisterhand_style.rs documents these as stub-with-state on Windows:
3. DPI / scaling crispness
- Confirm per-monitor-v2 DPI awareness is declared + honored (
dpi_compat.rs); fix blurry scaling on non-100% displays.
- Common-controls v6 visual-styles manifest if not already applied.
4. Control polish
- Modern fonts (Segoe UI Variable where available) + consistent metrics across widgets.
- Where cheap, use theme-aware colors (system accent) instead of hardcoded GDI palettes.
Acceptance
- Default Win32 ToDo sample on Win11 shows rounded corners, Mica backdrop, dark-mode-aware titlebar, and crisp HiDPI.
- Border/opacity/corner-radius styling renders (not just stored).
- No regression on Win10.
Tracks discussion #3486. Full Fluent backend: #4680.
Summary
Near-term modernization of the existing Win32/GDI Windows backend (
crates/perry-ui-windows) so default Windows apps stop looking Win7-era — without waiting on the full WinUI backend (#4680).From discussion #3486. Most of the "40-year-old" look is fixable on the current path with DWM attributes + finishing already-stubbed styling, no new backend required.
Tasks
1. DWM modern window chrome (Win11)
Currently none of these are used (only
app.rstouches dark mode). Add towindow.rswindow creation:DWMWA_USE_IMMERSIVE_DARK_MODE— dark titlebar following system/app theme.DWMWA_WINDOW_CORNER_PREFERENCE(DWMWCP_ROUND) — rounded corners.DWMWA_SYSTEMBACKDROP_TYPE(DWMSBT_MAINWINDOW/ Mica,DWMSBT_TRANSIENTWINDOW/ Acrylic) — Mica/Acrylic backdrop.E_INVALIDARG).2. Finish stubbed styling apply paths
geisterhand_style.rsdocuments these as stub-with-state on Windows:set_opacity/set_border_color/set_border_width(layered-window / WM_PAINT subclass paths — partial per Windows: 5 styling FFI stubs awaiting custom paint pass (#185 follow-up) #210).set_corner_radius(border radius) actually rendering.3. DPI / scaling crispness
dpi_compat.rs); fix blurry scaling on non-100% displays.4. Control polish
Acceptance
Tracks discussion #3486. Full Fluent backend: #4680.