On Mon, May 26, 2014 at 5:06 PM, Sebastian Kügler <se...@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 _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel