High DPI issues

David Edmundson david at davidedmundson.co.uk
Mon May 19 14:21:43 UTC 2014


On Mon, May 19, 2014 at 3:47 PM, Marco Martin <notmart at gmail.com> wrote:
> On Monday 19 May 2014, David Edmundson wrote:
>> Read this before doing anything:
>> http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-> ios-and-x11/
>>
>> There are branches being merged in for 5.4. They affect QWidgets too.
>>
>> Everything is based around a devicePixelRatio.
>> As I understand it, you write code as though you have pixels on a
>> normal 96dpi screen; but then there's a scaling factor for high DPI
>> skills which converts to screen pixels.
>
> do you know how/if affects qml part?
>
> I guess it risks to cumulate the effects of the scaling we are already doing..
>
It's littered all over the code.

Mostly it's one call to openGL to say to scale everything.

Then there's various bits throughout the rest of the code mostly in
Image, to make sure it loads textures that are the right size in
physical pixels not virtual ones.

There's no exposed setDevicePixelRatio.

I can't imagine it being a big problem; our stuff is mostly based
around font size, so if Qt scales everything up, one would choose a
smaller font (or rather, won't set a massive one) and everything will
still work.

The only problem is the units property devicePixelRatio, which doesn't
seem to be used by anyone?

David



> --
> Marco Martin
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel


More information about the Plasma-devel mailing list