summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-27 14:10:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-27 14:10:25 (GMT)
commitaa36b6701c11a5bb0bae6de9df570a6c530bcead (patch)
tree2879ec5e06b5b5ef17029bffb7f2d82f253e5290 /examples
parentdbfc08cf8de75439f78f2b10a6b487ff23735f69 (diff)
parentfbe0d24bdd429248dbf9e9be592f15fd7b1648bc (diff)
downloadQt-aa36b6701c11a5bb0bae6de9df570a6c530bcead.zip
Qt-aa36b6701c11a5bb0bae6de9df570a6c530bcead.tar.gz
Qt-aa36b6701c11a5bb0bae6de9df570a6c530bcead.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Remove unnecessary QtQuick 1.1 effectiveLayoutDirection, effectiveHorizontalAlignment and anchors.mirror properties
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/righttoleft/layoutdirection/layoutdirection.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml b/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
index b4efebe..197ea39 100644
--- a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
+++ b/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml
@@ -226,7 +226,17 @@ Rectangle {
Component {
id: viewDelegate
Item {
- width: (listView.effectiveLayoutDirection == Qt.LeftToRight ? (index == 48 - 1) : (index == 0)) ? 40 : 50
+ function effectiveLayoutDirection() {
+ if (LayoutMirroring.enabled)
+ if (listView.layoutDirection == Qt.LeftToRight)
+ return Qt.RightToLeft;
+ else
+ return Qt.LeftToRight;
+ else
+ return listView.layoutDirection;
+ }
+
+ width: (effectiveLayoutDirection() == Qt.LeftToRight ? (index == 48 - 1) : (index == 0)) ? 40 : 50
Rectangle {
width: 40; height: 40
color: Qt.rgba(0.5+(48 - index)*Math.random()/48,