aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStanislav Ionascu <stanislav.ionascu@nokia.com>2010-07-26 10:21:37 +0300
committerSergiy Dubovik <sergiy.dubovik@nokia.com>2010-07-27 13:37:08 +0300
commit9bfb1a416a9a63bc1eb0c72f6b17bca4a9e84c15 (patch)
treea437a7aa68d8008ed3ed7a6c06d0c1952b85250d /src
parentbcc182a806db94fa124aae7efae7c65289694538 (diff)
Fixes: NB#181747 - Defined margin of a MButton won't work in right-to-left mode
RevBy: John, Bjorn Details: The label of the button was always translated to the left margin, independent on layout direction. Fixed by taking into account the layout direction.
Diffstat (limited to 'src')
-rw-r--r--src/views/mbuttonview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/views/mbuttonview.cpp b/src/views/mbuttonview.cpp
index ca6da4b2..d1af0d37 100644
--- a/src/views/mbuttonview.cpp
+++ b/src/views/mbuttonview.cpp
@@ -227,7 +227,10 @@ void MButtonViewPrivate::calcIconTextRects()
}
//adjust label with button margins
- label->setGeometry(textRect.translated(q->marginLeft(), q->marginTop()));
+ if (controller->layoutDirection() == Qt::LeftToRight)
+ label->setGeometry(textRect.translated(q->marginLeft(), q->marginTop()));
+ else
+ label->setGeometry(textRect.translated(q->marginRight(), q->marginTop()));
}
void MButtonViewPrivate::loadIcon(const QIcon &newQIcon, const QSize &newIconSize)