summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-20 11:37:37 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-06-20 11:37:37 (GMT)
commitf332786abc6817fefaa683fb22caa40184c1316e (patch)
treef604af4c61007eee49d39d715b300c3622c52753 /examples/declarative
parent9a3f592966b9227f099e752f578a157500989146 (diff)
parent61aae4e9a033bfb59664105e5377fd086bacb517 (diff)
downloadQt-f332786abc6817fefaa683fb22caa40184c1316e.zip
Qt-f332786abc6817fefaa683fb22caa40184c1316e.tar.gz
Qt-f332786abc6817fefaa683fb22caa40184c1316e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Diffstat (limited to 'examples/declarative')
-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,