Skip to content

Win32 backend Fluent polish: DWM Mica/rounded-corners/dark titlebar + finish styling stubs + DPI #4681

Description

@proggeramlug

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions