Skip to content

feat: add DPI awareness and scaling support - #237

Merged
sigoden merged 1 commit into
mainfrom
feat
Jun 8, 2026
Merged

feat: add DPI awareness and scaling support#237
sigoden merged 1 commit into
mainfrom
feat

Conversation

@sigoden

@sigoden sigoden commented Jun 8, 2026

Copy link
Copy Markdown
Owner
  • Enable system‑aware DPI context at application start using SetProcessDpiAwarenessContext.
  • Activate the Win32_UI_HiDpi feature in Cargo.toml for required Win32 DPI APIs.
  • Introduce base size constants and compute DPI‑scaled icon, window, and border sizes via GetDpiForWindow.
  • Refactor GdiAAPainter to calculate scaled dimensions, pass them to drawing functions, and move click‑detection logic into the painter.
  • Adjust coordinate calculations to use scaled sizes, ensuring the UI adapts correctly on high‑DPI displays.

Close #236

- Enable system‑aware DPI context at application start using `SetProcessDpiAwarenessContext`.
- Activate the `Win32_UI_HiDpi` feature in Cargo.toml for required Win32 DPI APIs.
- Introduce base size constants and compute DPI‑scaled icon, window, and border sizes via `GetDpiForWindow`.
- Refactor `GdiAAPainter` to calculate scaled dimensions, pass them to drawing functions, and move click‑detection logic into the painter.
- Adjust coordinate calculations to use scaled sizes, ensuring the UI adapts correctly on high‑DPI displays.
@sigoden
sigoden merged commit a7c59ae into main Jun 8, 2026
1 check passed
@sigoden
sigoden deleted the feat branch June 8, 2026 02:57
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.

Support HiDPI

1 participant