Jens
Qt
Styles
Posted by Jens
 in Qt, Styles
 on Friday, June 26, 2009 @ 14:08

I did some work this week on a task related to higher DPI values on Vista. The task was essentially about scaling artifacts related to checkboxes, radio buttons and menus. However after fixing up those I decided that we needed a little more to really work properly on Vista and Windows 7 and realized that there were still quite a few hard-coded pixel metrics in the current styling API that really should depend on DPI as well. So after adjusting those metrics, most Qt apps should now look a lot nicer at higher DPI values. The fixes will also directly benefit similar functionality on Mac, once this gets properly supported by Apple.

Here are some screenshots showing noticable improvements in 4.6 vs 4.5 at a moderate scale size of 1.25:

dpi1.png

With the improved DPI-scaled metrics this is what it should look like in 4.6:

dpi2.png

No radical change in this case, but it certainly looks more polished than the old one. At very high DPI scaling values (1.5 and up) Windows Vista defaults to showing applications in a compatibility friendly, but rather fuzzy scaled mode. In 4.6 we plan to make applications scale properly by default. Unfortunately existing applications are likely to have pixel-based assumptions, so the only real way to ensure that your app will look correct is to try it out.

dpi45.png

And again, this is how things should look with 4.6:

dpi46.png

3 Responses to “Improving support for higher DPI on Vista”

» Posted by Eritak Matias
 on Friday, June 26, 2009 @ 16:06

Amazing !
Is very nice to see windows love !

Thanks !

» Posted by Scorp1us
 on Friday, June 26, 2009 @ 18:40

“Little things” like this are bigger than you imagine. Thanks for the attention to detail!

(And those who make pixel assumptions deserve what they get!)

» Posted by Philippe
 on Monday, June 29, 2009 @ 13:01

I second Scorp1us, attention to details is important. I favour quality of features over quantity.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.