summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorNorwegian Rock Cat <qt-info@nokia.com>2009-05-20 12:52:23 (GMT)
committerNorwegian Rock Cat <qt-info@nokia.com>2009-05-20 12:55:24 (GMT)
commit6e03459f72b090695767f263e1d51e5182f5f317 (patch)
tree98365c85d63191b0f4b83ec4f78abba3128c9c56 /src/gui/styles/qmacstyle_mac.mm
parent3f705ded78ed54ec63ca09cc81dfb68bc2235190 (diff)
downloadQt-6e03459f72b090695767f263e1d51e5182f5f317.zip
Qt-6e03459f72b090695767f263e1d51e5182f5f317.tar.gz
Qt-6e03459f72b090695767f263e1d51e5182f5f317.tar.bz2
Don't draw an arrow for toolbuttons that are text only and have a menu.
I made this change to make things look a bit better on the mac. However, a toolbutton with text only looks strange and as a bonus the arrow covers some of the text, which no one wants. It seems that similar consructions in Cocoa don't show the arrow for text button, so we shouldn't either. Task-number: 253339 Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/styles/qmacstyle_mac.mm')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index e4829dc..1be3d6e 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -5104,7 +5104,8 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
arrowOpt.state = tb->state;
arrowOpt.palette = tb->palette;
drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget);
- } else if (tb->features & QStyleOptionToolButton::HasMenu) {
+ } else if ((tb->features & QStyleOptionToolButton::HasMenu)
+ && (tb->toolButtonStyle != Qt::ToolButtonTextOnly && !tb->icon.isNull())) {
drawToolbarButtonArrow(tb->rect, tds, cg);
}
if (tb->state & State_On) {