summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-14 09:03:35 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-14 09:23:50 (GMT)
commite7ea80161aa91369cf700b79e96e97367ecf0ff6 (patch)
treedf222b411cc1e3a40a248dc5f7f5a3af60fc785b /src/gui/styles/qstylesheetstyle.cpp
parent572d57b255227f74c7ce61ab67476d4971955ea9 (diff)
downloadQt-e7ea80161aa91369cf700b79e96e97367ecf0ff6.zip
Qt-e7ea80161aa91369cf700b79e96e97367ecf0ff6.tar.gz
Qt-e7ea80161aa91369cf700b79e96e97367ecf0ff6.tar.bz2
Fix Toolbutton font with pseudo-states
So now QToolButton:pressed {text-decoration: underline} will works The change in QCommonStyle is to make it consistant with the setFont few lines later. Reveiwed-by: jbache
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index dcc11b8..cd44bfd 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3030,6 +3030,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
if (const QStyleOptionToolButton *tool = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
QStyleOptionToolButton toolOpt(*tool);
rule.configurePalette(&toolOpt.palette, QPalette::ButtonText, QPalette::Button);
+ toolOpt.font = rule.font.resolve(toolOpt.font);
toolOpt.rect = rule.borderRect(opt->rect);
bool customArrow = (tool->features & (QStyleOptionToolButton::HasMenu | QStyleOptionToolButton::MenuButtonPopup));
bool customDropDown = tool->features & QStyleOptionToolButton::MenuButtonPopup;