diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-04-17 13:54:10 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-18 09:18:43 +0200 |
commit | acfccd048368ccbd8466c4332db62807712dd288 (patch) | |
tree | fedc9bbadb6b84c17a253714e5e8d209b819dd2e /src/widgets/styles/qfusionstyle.cpp | |
parent | 4c7881396edbb513b15f7f46af9553a3d7478dab (diff) |
Fusion & GTK styles need to check direction from style option not qapp
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.
Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/styles/qfusionstyle.cpp')
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index c4c964f451..41046a1254 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1681,7 +1681,7 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio if (menuItem->menuItemType == QStyleOptionMenuItem::SubMenu) {// draw sub menu arrow int dim = (menuItem->rect.height() - 4) / 2; PrimitiveElement arrow; - arrow = QApplication::isRightToLeft() ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight; + arrow = option->direction == Qt::RightToLeft ? PE_IndicatorArrowLeft : PE_IndicatorArrowRight; int xpos = menuItem->rect.left() + menuItem->rect.width() - 3 - dim; QRect vSubMenuRect = visualRect(option->direction, menuItem->rect, QRect(xpos, menuItem->rect.top() + menuItem->rect.height() / 2 - dim / 2, dim, dim)); |