HiDPI in Win10 and "fix apps so they're not blurry"
-
- Knows some wx things
- Posts: 31
- Joined: Wed Mar 11, 2009 11:03 pm
HiDPI in Win10 and "fix apps so they're not blurry"
Hello,
I have no previous experience with HiDPI support, so when I tested HiDPI with wxWidgets, I had no idea what specific actions I need to take. Fortunately it works nearly out of the box. After rebuilding wxWidgets from git head and rebuilding my dialogs with the most recent version of wxFormBuilder, I only had to change all dialog sizes to -1,-1 and then check "Let Windows try to fix apps so they're not blurry" in Windows 10 settings to make HiDPI work. It's great.
I still wonder, why is that Win10 setting necessary? Or am I doing it wrong?
Stepan
I have no previous experience with HiDPI support, so when I tested HiDPI with wxWidgets, I had no idea what specific actions I need to take. Fortunately it works nearly out of the box. After rebuilding wxWidgets from git head and rebuilding my dialogs with the most recent version of wxFormBuilder, I only had to change all dialog sizes to -1,-1 and then check "Let Windows try to fix apps so they're not blurry" in Windows 10 settings to make HiDPI work. It's great.
I still wonder, why is that Win10 setting necessary? Or am I doing it wrong?
Stepan
-
- Knows some wx things
- Posts: 31
- Joined: Wed Mar 11, 2009 11:03 pm
Re: HiDPI in Win10 and "fix apps so they're not blurry"
App also needs to declare DPI awareness in manifest, I did that.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
I don't use formbuilder, so i don't know what ""Let Windows try to fix apps so they're not blurry" does. I assumed that it just sets the "DPI aware" flag in the manifest.
But if you don't use absolute sizes/positioning or custom drawing in your application, this is all you need to do.
You should also use the latest version from GIT, HiDPI support is still being worked on.
But if you don't use absolute sizes/positioning or custom drawing in your application, this is all you need to do.
You should also use the latest version from GIT, HiDPI support is still being worked on.
Use the source, Luke!
-
- Knows some wx things
- Posts: 31
- Joined: Wed Mar 11, 2009 11:03 pm
Re: HiDPI in Win10 and "fix apps so they're not blurry"
"Let Windows try to fix apps so they're not blurry" is Win10 checkbox, it's in Settings / Display / Advanced scaling settings.
If I don't check it, there is no blur, but only about 50% of GUI elements are scaled properly (e.g. text in wxPropertyGrid is scaled, text in wxTreeCtrl is unscaled).
If I check it, there is still no blur and all GUI elements except wxAUI pane titles are scaled properly.
If I don't check it, there is no blur, but only about 50% of GUI elements are scaled properly (e.g. text in wxPropertyGrid is scaled, text in wxTreeCtrl is unscaled).
If I check it, there is still no blur and all GUI elements except wxAUI pane titles are scaled properly.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
Interesting, i didn't know that.Stepan Hrbek wrote: ↑Sun Dec 29, 2019 2:16 pm "Let Windows try to fix apps so they're not blurry" is Win10 checkbox, it's in Settings / Display / Advanced scaling settings.
I don't know what it does under the hood, but ideally an application should look right without it.
Use the source, Luke!
-
- Knows some wx things
- Posts: 31
- Joined: Wed Mar 11, 2009 11:03 pm
Re: HiDPI in Win10 and "fix apps so they're not blurry"
First image shows AUI sample with default win10 settings, scaling of text in top right pane is wrong.
[attachment=0]wx2.png[/attachment]
Second image shows good scaling when Win10 "fix apps" is checked.
[attachment=1]wx1.png[/attachment]
[attachment=0]wx2.png[/attachment]
Second image shows good scaling when Win10 "fix apps" is checked.
[attachment=1]wx1.png[/attachment]
Re: HiDPI in Win10 and "fix apps so they're not blurry"
As the Windows dialog in the background is scaled too, are these screenshots made with different scaling values?
Are you using the latest wxWidgets version from GIT? If not, please redo the test with that version.
Are you using the latest wxWidgets version from GIT? If not, please redo the test with that version.
Use the source, Luke!
-
- Knows some wx things
- Posts: 31
- Joined: Wed Mar 11, 2009 11:03 pm
Re: HiDPI in Win10 and "fix apps so they're not blurry"
Both is with 200% scaling.
Code is fresh from git today (38cec22d4c5ff591964dc1d36f62189a3d238eec)
It does not look trivial anymore, so I created ticket https://trac.wxwidgets.org/ticket/18642
Code is fresh from git today (38cec22d4c5ff591964dc1d36f62189a3d238eec)
It does not look trivial anymore, so I created ticket https://trac.wxwidgets.org/ticket/18642
Re: HiDPI in Win10 and "fix apps so they're not blurry"
Hi,
As Vadim wrote recently on the wx-users ML, using this checkbox shuoldn't be necessary.
However as doublemax pointed out - HiDPI is still WIP. Some stuff in the library is still not DPI aware - namely wxAUI, possibly wxGrid and some other controls.
Thank you.
As Vadim wrote recently on the wx-users ML, using this checkbox shuoldn't be necessary.
However as doublemax pointed out - HiDPI is still WIP. Some stuff in the library is still not DPI aware - namely wxAUI, possibly wxGrid and some other controls.
Thank you.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
I tried my wx app in Win10 set to scaling factor 125% and title bar font is sharp but everything below that is scaled.
Is there something I need to do to enable HiDPI support? This with the latest wx git master.
Is there something I need to do to enable HiDPI support? This with the latest wx git master.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
Hi,
Is your application "DPI Aware"? Meaning you turn this option "ON" inside the manifest...
Thank you.
Is your application "DPI Aware"? Meaning you turn this option "ON" inside the manifest...
Thank you.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
I haven't enabled anything related specifically. I've no idea what a manifest is or how to enable HiDPI in it. From what I gathered wx should do this automatically now by default since wxUSE_DPI_AWARE_MANIFEST defaults to 2 (use per monitor settings).
Re: HiDPI in Win10 and "fix apps so they're not blurry"
HiDPI now working after adding: '-DwxUSE_DPI_AWARE_MANIFEST=2' when compiling my project's Windows .rc file with Mingw's windres and copying in 'include/wx/msw/amd64_dpi_aware_pmv2.manifest' from wxWidgets distribution to 'include/wx/msw' at wx install prefix location.
Maybe HiDPI can be enabled somehow when compiling wx to avoid this?
Note, I didn't have to check or found any "fix apps so they're not blurry" setting in Win10.
Maybe HiDPI can be enabled somehow when compiling wx to avoid this?
Note, I didn't have to check or found any "fix apps so they're not blurry" setting in Win10.
Re: HiDPI in Win10 and "fix apps so they're not blurry"
BTW, Per Monitor DPI Awareness in wxWidgets is still work in progress and there issues, see e.g. here for some reported ones
https://trac.wxwidgets.org/ticket/18474
https://trac.wxwidgets.org/ticket/18474
Re: HiDPI in Win10 and "fix apps so they're not blurry"
And I can add to those that with HiDPI manifest enabled OpenGL reports as version 1.1, which is likely Windows software renderer.