summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-11-19 13:03:45 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2017-11-22 21:24:49 +0000
commit45a5f28aa4d6bc090a5fa094d3b2eb68306714a2 (patch)
treed9f270a57e9d57887fad711affdc946a519fd28d
parentd813c66bfcfac1837814ec4d174d0389172f0d4c (diff)
QTreeView/Fusion style : Draw child indicator correct in RTL-mode
Fusion style did not honor direction option when drawing the child indicator. This lead to a wrong rendering of QTreeView in right-to-left mode. Task-number: QTBUG-63396 Change-Id: I2d5de03d7c831e3caabcc9269617eecb9338f163 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
-rw-r--r--src/widgets/styles/qfusionstyle.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index 016a5e2ad7..774eca1018 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -472,8 +472,10 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
break;
if (option->state & State_Open)
drawPrimitive(PE_IndicatorArrowDown, option, painter, widget);
- else
- drawPrimitive(PE_IndicatorArrowRight, option, painter, widget);
+ else {
+ const bool reverse = (option->direction == Qt::RightToLeft);
+ drawPrimitive(reverse ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight, option, painter, widget);
+ }
break;
}
#if QT_CONFIG(tabbar)