summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-03-19 12:13:09 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-03-19 12:27:07 (GMT)
commit5ec83155359553d3e5df230a4aca22eaa1066fc7 (patch)
treeb32c4e40c2327641e65c4cbfab69e8d40eef8f14
parent725c2c29c192349016b1332824a7716bbb992f31 (diff)
downloadQt-5ec83155359553d3e5df230a4aca22eaa1066fc7.zip
Qt-5ec83155359553d3e5df230a4aca22eaa1066fc7.tar.gz
Qt-5ec83155359553d3e5df230a4aca22eaa1066fc7.tar.bz2
fix QTabBar scroll button arrow position in Windows mobile style
Task-number: QTBUG-8757 Reviewed-by: thartman
-rw-r--r--src/gui/styles/qwindowsmobilestyle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp
index a5da038..5f939d0 100644
--- a/src/gui/styles/qwindowsmobilestyle.cpp
+++ b/src/gui/styles/qwindowsmobilestyle.cpp
@@ -5076,6 +5076,10 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
color = option->palette.buttonText().color();
QImage image;
int xoffset, yoffset;
+ bool isTabBarArrow = widget && widget->parent()
+ && widget->inherits("QToolButton")
+ && widget->parent()->inherits("QTabBar");
+
switch (element) {
case PE_IndicatorArrowUp:
image = d->imageArrowUp;
@@ -5090,12 +5094,12 @@ void QWindowsMobileStyle::drawPrimitive(PrimitiveElement element, const QStyleOp
case PE_IndicatorArrowLeft:
image = d->imageArrowLeft;
xoffset = 8;
- yoffset = 2;
+ yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowRight:
image = d->imageArrowRight;
xoffset = 8;
- yoffset = 2;
+ yoffset = isTabBarArrow ? 12 : 2;
break;
case PE_IndicatorArrowUpBig:
image = d->imageArrowUpBig;