Removes the need for calling QMLOutput::updateRootProperties() from
arbitrary places. This way the root dimensions will always be up-to-date.
This fixes snapping when output scaling changes.
sebas | |
davidedmundson | |
apol |
Removes the need for calling QMLOutput::updateRootProperties() from
arbitrary places. This way the root dimensions will always be up-to-date.
This fixes snapping when output scaling changes.
Lint Skipped |
Unit Tests Skipped |
kcm/qml/Output.qml | ||
---|---|---|
46 | If you pass item.rotation as an argument, qml will pick up the change automatically. Can't rotation change? |
QML is clever enough to re-evaluate the function when item.rotation or dimensions change.
It actually does, since the function depends on the object. Try running this and resize the window:
import QtQuick 2.0 Rectangle { id: root anchors.fill: parent color: "red" function f(item) { if (item.width > 1000) { console.log("Wide"); } else { console.log("Narrow"); } return 0 } rotation: f(root) }