Skip to content

Add per-monitor DPI awareness - #28

Open
danielchalmers wants to merge 1 commit into
v5/ping-addressfrom
v5/per-monitor-dpi
Open

danielchalmers wants to merge 1 commit into
v5/ping-addressfrom
v5/per-monitor-dpi

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Held for v5.0.0.

  • On a monitor scaled differently from the main one, like a laptop at 150% next to a monitor at 100%, the readings, tooltip and menu are no longer blurry. The widget draws at each monitor's own scale, at the same size as before.
  • Parked in a corner or against an edge, it stays there when its scale changes: when that monitor's scaling is changed in Settings, even while the widget is closed, or when it's moved to another monitor. Dragged between monitors, it stays under the pointer.
  • Keeping it against its edges and on screen is now worked out in device pixels, so it also works on a second monitor.
  • Adds an app.manifest (PerMonitorV2). The DoNotScaleForDpiChanges switch is set in code as well as App.config, since the download is just the exe.

Release notes: a position saved by 4.x on a monitor scaled differently from the main one can open somewhere else on that monitor the first time, but fully on it. Positions on the main monitor are unchanged.

@danielchalmers
danielchalmers marked this pull request as ready for review October 12, 2026 15:41
@danielchalmers danielchalmers changed the title Stay sharp on monitors with different scaling Add per-monitor DPI awareness Oct 12, 2026
@danielchalmers
danielchalmers added this pull request to stack #33 October 12, 2026 16:28
- Add app.manifest declaring PerMonitorV2 DPI awareness, with PerMonitor fallback
- Set DoNotScaleForDpiChanges=false in App.config and in OnStartup, since we ship the exe
- Adjust WM_DPICHANGED suggested bounds to keep the widget's edges, except while dragging
- Do edge and on-screen placement in device pixels; move with one SetWindowPos call
- Re-fit the restored position after first layout if the monitor's scale changed
@github-actions github-actions Bot added the enhancement New feature or request label Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant