DPI Awareness and DPI scale issue

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

DPI Awareness and DPI scale issue

Post by csniper »

Basic info: wxWidgets 3.2.1 on Windows 10.
I set DPI Awareness as "Per Monitor High DPI Aware". I tried to change DPI scale of my monitor from 100% to 150% or vice versa. What found:
1. Did not get notification in my callback for wxDPIChangedEvent
2. The APP looks a little bit weird, some GUI controls changed accordingly but not all.
a)wxMenu and wxToolbar/wxAuiToolbar would not follow the change but the tab ctrl of wxAuiNotebook scaled well except that the title text look floating upper than expected
b)Existing TextCtrls would not scale the text accordingly but the new created ones looked better
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: DPI Awareness and DPI scale issue

Post by ONEEYEMAN »

Hi,
Did you compile the library yourself? With what compiler? How exactly?
Did you try to run any of the official samples to check the lack of the events?
Thank you.
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

Re: DPI Awareness and DPI scale issue

Post by csniper »

Yes. I compiled all from souce by VS 2022, VC 17.4.3.
BTW, it's 64 bit WIndows 10.

I tried the sample from wx and confirmed the wxDPIChangedEvent could not be received by adding the code snippet as below(samples/text)

Code: Select all

    EVT_MENU(RICHTEXT_TAB_STOPS, RichTextFrame::OnTabStops)
    EVT_DPI_CHANGED(RichTextFrame::OnDPIChanged)
wxEND_EVENT_TABLE()
Anything wrong?

For your question to the others, I need a more complex sample to try. However, I did not custimize much on the controls used. SO, I don't think it's bug in my project.
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

Re: DPI Awareness and DPI scale issue

Post by csniper »

Foundings on sample/widgets after changing scale from 100% to 150%
All the sample widgets from Comobox down to ToggleButton will scale but not others above it.
Any idea?
After scale
Attachments
2022-12-27 15 33 23.png
2022-12-27 15 33 23.png (17.66 KiB) Viewed 1175 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: DPI Awareness and DPI scale issue

Post by ONEEYEMAN »

Hi,
That weird.
You probably should create an issue on wxWidgets github repo


Thank you.
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

Re: DPI Awareness and DPI scale issue

Post by csniper »

My app
Attachments
From 150 to 100.png
From 150 to 100.png (33.75 KiB) Viewed 1128 times
From 100 to 150.png
From 100 to 150.png (20.05 KiB) Viewed 1128 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: DPI Awareness and DPI scale issue

Post by ONEEYEMAN »

Hi,
Can you reproduce it in the (minimal) sample provided by the library?
If you can - please open an issue at github wxwidgets reo.

Thank you.
csniper
Experienced Solver
Experienced Solver
Posts: 53
Joined: Mon Mar 13, 2017 8:27 am

Re: DPI Awareness and DPI scale issue

Post by csniper »

In the notebook example, I still could not get the idea how wx handled DPI scaling. Not all scaled and it does not responded to scaling changing.
Attachments
2022-12-28 13 31 24.png
2022-12-28 13 31 24.png (9.25 KiB) Viewed 1111 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: DPI Awareness and DPI scale issue

Post by ONEEYEMAN »

Hi,
Please send an E-mail to wx-users ML to confirm that its not a known issue.
If not + please file an issue.

This is a user forum made for users by users.

Thank you.
Post Reply