Opened 9 months ago

Last modified 7 months ago

#18576 new defect

Some HiDPI issues/regressions

Reported by: pb101 Owned by:
Priority: normal Milestone:
Component: wxMSW Version: dev-latest
Keywords: HiDPI Cc:
Blocked By: Blocking: #18474
Patch: no

Description

I have noticed in my application compiled with the master after fcda2beab/git-wxWidgets that button height can sometimes get too small when a dialog created on a HiDPI screen is moved to a standard DPI one. Trying to reproduce the issue with samples, I found some others. These issues are not related to the above-mention commit, I can reproduce them with a slightly older, post 3.1.3, wxWidgets version.

The text below is based on the dialogs sample.

Issue I: Buttons shrink when moved from HiDPI to standard DPI screen

  1. Launch the sample on a HiDPI screen.
  2. From menu Dialogs select Standard Buttons Sizer Dialog
  3. In the dialog check Enable Affirmative Button and Enable Dismiss Button.
  4. Move the dialog to the regular DPI screen and observe buttons being too tight around their labels (see attachment 1).

This dialog is resizable and when you increase its size enough, the buttons will adjust to their expected size. However, when decreasing the dialog size, they are willing to shrink too much again. Not all dialogs in the sample exhibit the same issue, the issue is not limited to the wxStdDialogButtonSizer.

Issue II: Resizable dialogs have drawing artifacts when moved from HiDPI to standard DPI screen

It seem this issue is worse with the dialogs not exhibiting Issue I. There are two short thick perpendicular white lines in the bottom left corner of the dialog, probably somehow related to drawing the window gripper (see attachment 2).

Issue III: wxTextCtrl fits around the text when moved from HiDPI to standard DPI

When moving the dialog invoked by "Test dialog default action" menu, the text control fits around the text and the dialog is left with a lot of empty space on its bottom, see attachment 3.
I am not sure if this is not within the sample itself, Multiple Line Entry dialog does not have the issue, but it may be related to proportions, sizer type, minimal size...


Tested on Windows 10 v1903 build 18362.418
One HiDPI screen (primary) at 125% (120 DPI) and one standard DPI screen.

Attachments (4)

IssueI_buttons-too-low.png download (26.4 KB) - added by pb101 9 months ago.
Issue I
IssueII_buttons-artefacts.png download (4.1 KB) - added by pb101 9 months ago.
Issue II
IssueIII_textctrl-shrinks.png download (35.4 KB) - added by pb101 9 months ago.
Issue III
IssueI_buttons-text-cropped.png download (624 bytes) - added by pb101 9 months ago.
Issue I: too small buttons crop the text above descent (caron in "Ž") and below baseline ("y" looks like "v"))

Download all attachments as: .zip

Change History (6)

Changed 9 months ago by pb101

Issue I

Changed 9 months ago by pb101

Issue II

Changed 9 months ago by pb101

Issue III

Changed 9 months ago by pb101

Issue I: too small buttons crop the text above descent (caron in "Ž") and below baseline ("y" looks like "v"))

comment:1 Changed 9 months ago by pb101

  • Blocking 18474 added

comment:2 Changed 7 months ago by vadz

I think the issue I might be the same as #18649. I still don't know about the others though, I'll retest with 125% scaling to check if I can reproduce this at least.

Note: See TracTickets for help on using tickets.