Scaling issue with 4k displays?
Scaling issue with 4k displays?
Hi,
a user of Rocrail did complain that his laptop with a 4k resolution looks weird.
He has a 4K Display (3840x2160) with 250% scaling configured.
Should developers take some action to support 4k displays?
https://imgur.com/a/fY7lb
a user of Rocrail did complain that his laptop with a 4k resolution looks weird.
He has a 4K Display (3840x2160) with 250% scaling configured.
Should developers take some action to support 4k displays?
https://imgur.com/a/fY7lb
- Attachments
-
- rocview-normal.png (12.05 KiB) Viewed 3826 times
-
- rocview-4k.png (6.02 KiB) Viewed 3826 times
Last edited by rocrail on Mon Oct 02, 2017 3:08 pm, edited 1 time in total.
Re: Scaling issue with 4k displays?
Platform, exact wxWidgets version?
And if it's under Windows: Is your app marked as "DPI aware"?
And if it's under Windows: Is your app marked as "DPI aware"?
Use the source, Luke!
Re: Scaling issue with 4k displays?
The Platform is Win10 with wxWidgets 3.02.
Where, why, should I set this?Is your app marked as "DPI aware"?
Re: Scaling issue with 4k displays?
viewtopic.php?p=178242#p178242
However, if your app is not marked as "DPI aware", it should run in a kind of "emulation mode" in which your app only "sees" a small screen resolution and Windows will scale the output of the application up.
Which compiler/IDE do you use under Windows? If it's Visual Studio, it's possible that the flag is already set through the manifest.
Do you calculate any font size yourself instead of using a default one?
However, if your app is not marked as "DPI aware", it should run in a kind of "emulation mode" in which your app only "sees" a small screen resolution and Windows will scale the output of the application up.
Which compiler/IDE do you use under Windows? If it's Visual Studio, it's possible that the flag is already set through the manifest.
Do you calculate any font size yourself instead of using a default one?
Use the source, Luke!
Re: Scaling issue with 4k displays?
Hi,
the Windows target is cross compiled with MinGW under Linux.
The screen shots show custom controls for the throttle, and the font size is calculated depending on the size of the control.
The rest of the application is only using default wxWidgets style for sizing.
the Windows target is cross compiled with MinGW under Linux.
The screen shots show custom controls for the throttle, and the font size is calculated depending on the size of the control.
The rest of the application is only using default wxWidgets style for sizing.
Re: Scaling issue with 4k displays?
Can you show the code for that?the font size is calculated depending on the size of the control.
In the long term, you'll probably have to mark the exe as dpi-aware anyway. I think you should do that and check how your application looks afterwards.
Use the source, Luke!
Re: Scaling issue with 4k displays?
Hi,
Don't know what the big deal is with 4k because a human eye does not have this kind of resolution. (AFAIK)
Thanks for your time to answer my Qs.
could be, but I do not have 4k hardware and are not planning it in the next time.doublemax wrote:In the long term, you'll probably have to mark the exe as dpi-aware anyway. I think you should do that and check how your application looks afterwards.
Don't know what the big deal is with 4k because a human eye does not have this kind of resolution. (AFAIK)
I just checked: Its hard coded, I must improve that part.Can you show the code for that?
This seems not to work.However, if your app is not marked as "DPI aware", it should run in a kind of "emulation mode" in which your app only "sees" a small screen resolution and Windows will scale the output of the application up.
Thanks for your time to answer my Qs.
Re: Scaling issue with 4k displays?
You don't really need a 4k display for that, the setting of the display scaling in Windows is the crucial thing. If you set it to 150 or 200%, you should see the effect on your system. Usually it's best to test that in a VM, because it can mess up the desktop (icon positions and such) on a small screen.could be, but I do not have 4k hardware and are not planning it in the next time.
Use the source, Luke!
Re: Scaling issue with 4k displays?
Does wxWidgets also has th capability of setting the g.SetPageUnit(UnitInch); ?
https://stackoverflow.com/questions/110 ... lly-needed
https://stackoverflow.com/questions/110 ... lly-needed
Re: Scaling issue with 4k displays?
wxDC has wxDC::SetMapMode().
I couldn't find anything similar for wxGraphicsContext, but i guess SetScale() should work, you jut have to calculate the scaling factor yourself.
I couldn't find anything similar for wxGraphicsContext, but i guess SetScale() should work, you jut have to calculate the scaling factor yourself.
Use the source, Luke!