View Ticket
Not logged in
Ticket Hash: 9580ad480eeaa6b58fcd02f34d98b2a945fe3316
Title: Validate DPI behavior across monitors
Status: Verified Type: Feature Request
Severity: Cosmetic Priority: Medium
Subsystem: ZPreview.net Resolution: Rejected
Last Modified: 2026-04-29 22:17:32
21.5 hours ago
Created: 2026-04-23 16:47:55
7.1 days ago
Version Found In: 557b7a8262545d99ee8f60ee0cd056e3ffb62d2c
Description:
Verplaats ZPreview naar een monitor met andere DPI-schaling en controleer dat het venster scherp blijft (niet wazig door bitmap-schaling).
User Comments:
github-copilot/gpt-5.4 (claiming to be tinus) added on 2026-04-23 17:15:06:

Verplaats ZPreview naar een monitor met andere DPI-schaling en controleer dat het venster scherp blijft (niet wazig door bitmap-schaling).


tinus added on 2026-04-29 09:21:53:

Now the window doesn’t become blurry, but the text greatly varies in size depending on which monitor the window is on.

The default size of the configuration, and all column sizes, are also too small when I move the window to a high-DPI monitor.


tinus added on 2026-04-29 20:28:50:

When I move the window to a low-DPI one, on the other hand, the text of (most notably) the text of the toolstrip in the top of the main window becomes huge. There's clearly some things not reacting correctly (or at all) to the change in DPI settings.

Here's the elements that look way too small on a display set to 250%:

Main window:

  • the text on the ToolStrip (the text in the embedded drop-down list of handlers is fine though)
  • the spacing around the file name label shrinks enormously, even though the label's caption appears normal

Configuration window:

  • the configuration window opens very small
  • on the ‘Shortcuts’ tab, all the rows are cramped (the bottom of the text is cut off). The columns are not wide enough for their contents either.
  • on the per-handler settings tabs, the controls are too close together vertically; they sometimes overlap.
  • on the Log tab (and everywhere the text preview handler is used) the space around the encoding is too small, and the search textbox and -button are not high enough; only about the top third of each letter is visible.
  • the About tab seems OK.
  • the OK and Cancel buttons are rather small, too.

SQLite preview handler

  • the rows in the results grid are not high enough.
  • the label ‘SQL Query’ is almost entirely hidden by the query edit textbox.
  • the query textbox is small, and can only fit about three lines of text. It should be able to fit at least five.

Hex viewer

  • looks OK

Archive viewer

  • the columns of the list view, which should autosize to accommodate the largest value, are all too small for their contents
  • the toolstrip in the embedded preview is also too small.
  • all the other text (listview, tree view, etc.) is fine.

Windows preview handlers

  • it depends on the actual preview handler. Some of them seem to be OK, others use too-small fonts.

github-copilot/gpt-5.4 (claiming to be tinus) added on 2026-04-29 20:33:05:

Investigating the PerMonitorV2 DPI regression in ZPreview. Current focus is form autoscaling and fixed pixel dimensions that stay too small after moving to a higher-DPI monitor.


github-copilot/gpt-5.4 (claiming to be tinus) added on 2026-04-29 20:40:30:

Implemented in 31654fe34e on branch ticket-9580ad48-dpi-scaling. ZPreview now declares explicit 96-DPI autoscaling for the code-built forms and reapplies fixed layout widths from logical pixels after DPI changes, so the main window and configuration UI should stay correctly sized after moving between monitors with different scaling. dotnet build ZAAP.net/ZPreview/ZPreview.csproj -p:EnableWindowsTargeting=true and dotnet build ZAAP.net/ZPreview.Tests/ZPreview.Tests.csproj -p:EnableWindowsTargeting=true both succeeded on Linux. dotnet test ZAAP.net/ZPreview.Tests/ZPreview.Tests.csproj -p:EnableWindowsTargeting=true could not run here because Microsoft.WindowsDesktop.App is not available on this Linux environment, so the actual monitor-switch behavior still needs Windows validation.


github-copilot/gpt-5.4 (claiming to be tinus) added on 2026-04-29 21:03:28:

Follow-up adjustments implemented in 8d5fe96a57 on branch ticket-9580ad48-dpi-scaling. This scales the main and embedded toolstrips, the text preview search row, the SQLite query/search chrome and grid row metrics, the configuration shortcuts grid row heights, and re-autosizes archive and SQLite list columns after DPI changes. dotnet build ZAAP.net/ZPreview/ZPreview.csproj -p:EnableWindowsTargeting=true, dotnet build ZAAP.net/ZPreview.PreviewHandlers/ZPreview.PreviewHandlers.csproj -p:EnableWindowsTargeting=true, dotnet build ZAAP.net/ZPreview.SQLitePreview/ZPreview.SQLitePreview.csproj -p:EnableWindowsTargeting=true, and dotnet build ZAAP.net/ZPreview.Tests/ZPreview.Tests.csproj -p:EnableWindowsTargeting=true all succeeded on Linux. dotnet test ZAAP.net/ZPreview.Tests/ZPreview.Tests.csproj -p:EnableWindowsTargeting=true still cannot run here because Microsoft.WindowsDesktop.App is unavailable in this Linux environment. Please recheck on Windows: main toolstrip text, text preview search textbox/button row, configuration Shortcuts grid row height, and archive list column widths after moving between monitors.


tinus added on 2026-04-29 21:30:11:

It does look better in general — even though the ToolStrip text is unchanged and way too small, and several grids do not resize very well.

But it takes ages before the main form is shown, and also ages (as in: several actual minutes) before the configuration form is shown.

Also, the position on screen is no longer remembered; the main window now always opens on the primary monitor, which is not what I want.

This is unusable, so I will reject this branch.


github-copilot/gpt-5.4 (claiming to be tinus) added on 2026-04-29 22:17:32:

Regression rollback implemented in a72f90c469 on branch ticket-9580ad48-dpi-scaling. The manual RescaleConstantsForDpi and explicit ToolStrip scaling hooks from the previous pass were causing extremely slow form startup and breaking restored window placement, so they have been removed. The safe static autoscale declarations remain, as do the static shortcuts/query grid row-height adjustments. dotnet build ZAAP.net/ZPreview/ZPreview.csproj -p:EnableWindowsTargeting=true, dotnet build ZAAP.net/ZPreview.PreviewHandlers/ZPreview.PreviewHandlers.csproj -p:EnableWindowsTargeting=true, dotnet build ZAAP.net/ZPreview.SQLitePreview/ZPreview.SQLitePreview.csproj -p:EnableWindowsTargeting=true, and dotnet build ZAAP.net/ZPreview.Tests/ZPreview.Tests.csproj -p:EnableWindowsTargeting=true all succeeded on Linux. Please recheck on Windows first that forms open promptly again and that the main window restores to its remembered monitor/location. Remaining DPI sizing issues are still under review and need a less invasive fix.