diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-02-25 16:22:41 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-06 10:41:40 (GMT) |
commit | 08ea1e66b8dc701ce49643d193c923c011298a63 (patch) | |
tree | 2320e62f0a8fb514b0ae17562aedec18e03f3774 /tools/designer | |
parent | eae36248bce464cef22a6a6286690e1cc6857159 (diff) | |
download | Qt-08ea1e66b8dc701ce49643d193c923c011298a63.zip Qt-08ea1e66b8dc701ce49643d193c923c011298a63.tar.gz Qt-08ea1e66b8dc701ce49643d193c923c011298a63.tar.bz2 |
Fix moving widgets in horizontal layouts in RTL mode.
Task-number: QTBUG-25872
Change-Id: Ia311b88f0ed3450d798bc5a9136e978c642d5b25
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
(cherry picked from qttools/eb456f72052b02a77e22868bfa55a25d7af3e660)
Diffstat (limited to 'tools/designer')
-rw-r--r-- | tools/designer/src/lib/shared/qlayout_widget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/designer/src/lib/shared/qlayout_widget.cpp b/tools/designer/src/lib/shared/qlayout_widget.cpp index 238fca0..e60cf7e 100644 --- a/tools/designer/src/lib/shared/qlayout_widget.cpp +++ b/tools/designer/src/lib/shared/qlayout_widget.cpp @@ -57,6 +57,7 @@ #include <QtGui/QVBoxLayout> #include <QtGui/QGridLayout> #include <QtGui/QFormLayout> +#include <QtGui/QApplication> #include <QtGui/qevent.h> #include <QtCore/qdebug.h> @@ -1388,7 +1389,9 @@ void QLayoutSupport::adjustIndicator(const QPoint &pos, int index) const bool closeToLeft = fromLeftRight == fromLeft; showIndicator(RightIndicator, QRect(closeToLeft ? g.x() : g.right() + 1 - indicatorSize, 0, indicatorSize, r.height()), bluePalette); - const int incr = closeToLeft ? 0 : +1; + const QWidget *parent = layout()->parentWidget(); + const bool leftToRight = Qt::LeftToRight == (parent ? parent->layoutDirection() : QApplication::layoutDirection()); + const int incr = leftToRight == closeToLeft ? 0 : +1; setCurrentCellFromIndicator(indicatorOrientation, m_currentIndex, incr); } break; |