High DPI issues
David Edmundson
david at davidedmundson.co.uk
Mon May 26 15:16:25 UTC 2014
On Mon, May 26, 2014 at 5:06 PM, Sebastian Kügler <sebas at kde.org> wrote:
> On Monday, May 26, 2014 16:55:42 Teo Mrnjavac wrote:
>> > Now, the most important difference to the approach I've seen in Qt, is
>> > that
>> > this is a QML binding in our case instead of a scaling factor which you
>> > inject in the rendering engine. This means, we can change those not only
>> > on
>> > runtime, but have different settings for different parts of an
>> > application.
>> > Think of an application with 2 windows, one on your old school monitor,
>> > the
>> > other on your retina screen. We could adjust those depending on which
>> > screen you're running, even inside the same application.
>> >
>> >
>> >
>> > The official docs for this can be found here:
>> > http://developer.ubuntu.com/api/devel/ubuntu-12.04/qml/ui-toolkit/resoluti
>> > on -independence.html
>
> Note that they actually got this wrong: They're not using a binding but an
> invokable, meaning that gridUnit changes aren't propagated automatically, but
> need to be triggered for re-evaluation. This looks like an API problem to me,
> so it's not easily fixable for them (without changing the API).
For the same reasons we should avoid using
theme.mSize(theme.defaultFont).height for spacing in our code, which
I've seen in many places.
Also FWIW Ubuntu also have the grid size as a property
http://developer.ubuntu.com/api/devel/ubuntu-12.04/qml/ui-toolkit/qml-ubuntu-components0-units.html
No idea why they use the old method in their examples.
David
More information about the Plasma-devel
mailing list