Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxTextCtrl font size issue for multiline rich text in mixed multi-display DPI aware environment #24446

Open
gsxruk opened this issue Mar 30, 2024 · 0 comments

Comments

@gsxruk
Copy link
Contributor

gsxruk commented Mar 30, 2024

Description

This bug is likely to be seen only in the environment described in the title.

I am using a dual monitor setup. One monitor is 4K and the other is 1080p.

The issue occurs when the application is launched from the 1080p monitor and displayed on the 4K monitor. The issue is not seen in the other direction.

Bug Description

When the application is launched from the 1080p monitor (for example by double clicking the executable within Windows explorer) and the window is set to open on the 4K monitor, the wxTextCtrl's set for multiline rich text display their text enlarged.

There is a simple sample attached to demonstrate the issue. The sample consists of a simple window displaying 3 wxTextCtrl. The top control is set to multi-line rich text, the middle control is set to single line rich text and the bottom control is set to multi-line non rich text. There is also a resource file that declares a DPI aware level 2.

To Reproduce

  1. Run the sample. It is important to launch the application from the 1080p monitor.
  2. Observe the top text control displays the text larger than the others.

Note: It may be necessary to change the display integer in the sample to suit your system. The display for '1' (as the sample code) is for my 4K monitor but this will likely be different on other systems.

The attached image shows the result on my system.

Expected vs Observed Behaviour

The expected behaviour is for all of the text controls to display the text in a font of the same size.

Attachments

sample.zip

Result

Platform and Version Information

  • wxWidgets version you use: v3.2.4
  • wxWidgets port you use: wxMSW
  • OS and its version: Windows 10 v22H2 (Build: 19045.4170)
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

No branches or pull requests

1 participant