summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-31 15:33:12 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-31 15:33:12 (GMT)
commit73fc68802d8c0c8d3d499b279782ce270f1c5bc6 (patch)
tree8cd7f54bc06864a741f0a2fd34412124c53e5953 /examples
parent9e4ded47bc9e3fed3ee2a15e572603bb3f7b48fc (diff)
parent570f8970bea646055583671397c3d2706ac45004 (diff)
downloadQt-73fc68802d8c0c8d3d499b279782ce270f1c5bc6.zip
Qt-73fc68802d8c0c8d3d499b279782ce270f1c5bc6.tar.gz
Qt-73fc68802d8c0c8d3d499b279782ce270f1c5bc6.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts: src/gui/text/qtextengine.cpp src/gui/text/qtextengine_p.h src/gui/text/qtextlayout.cpp src/plugins/phonon/mmf/mmf.pro src/plugins/s60/5_0/5_0.pro tests/auto/qtextlayout/tst_qtextlayout.cpp
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 3044430..fa343b9 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,