summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-09 15:33:38 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-09 15:33:38 (GMT)
commitb4ddf0420db30098274986612ca3e8951ef18e2e (patch)
treea85bdad9b92652b09dd613b2172d5b07d4926d4b /src/gui/styles/qmacstyle_mac.mm
parent612a7680e10eb434cd6e09a2165ab1b75efdb72a (diff)
parente1fead7c4f877308c2cc11131c445a1f7085baf7 (diff)
downloadQt-b4ddf0420db30098274986612ca3e8951ef18e2e.zip
Qt-b4ddf0420db30098274986612ca3e8951ef18e2e.tar.gz
Qt-b4ddf0420db30098274986612ca3e8951ef18e2e.tar.bz2
Merge branch '4.7' into mimir
Diffstat (limited to 'src/gui/styles/qmacstyle_mac.mm')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 671a888..fb31ae4 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -3336,6 +3336,8 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
if (needText) {
QPalette pal = tb->palette;
QPalette::ColorRole role = QPalette::NoRole;
+ if (!proxy()->styleHint(SH_UnderlineShortcut, tb, w))
+ alignment |= Qt::TextHideMnemonic;
if (down)
cr.translate(shiftX, shiftY);
if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5
@@ -3353,13 +3355,13 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
role = QPalette::HighlightedText;
}
}
- drawItemText(p, cr, alignment, pal,
- tb->state & State_Enabled, tb->text, role);
+ proxy()->drawItemText(p, cr, alignment, pal,
+ tb->state & State_Enabled, tb->text, role);
if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_5 &&
(tb->state & State_Sunken)) {
// Draw a "drop shadow" in earlier versions.
- drawItemText(p, cr.adjusted(0, 1, 0, 1), alignment,
- tb->palette, tb->state & State_Enabled, tb->text);
+ proxy()->drawItemText(p, cr.adjusted(0, 1, 0, 1), alignment,
+ tb->palette, tb->state & State_Enabled, tb->text);
}
}
} else {