summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qmacstyle_mac.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-08-03 12:22:40 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-08-04 07:38:36 (GMT)
commitb0965cd049997283976c132fceb9727b6582ca49 (patch)
treeb2524df6e9bb6cd0d1b5e58d3c026f9417cced3b /src/gui/styles/qmacstyle_mac.mm
parent0b736b21b5acd2cd412f70b7aa5902e0aa091dfc (diff)
downloadQt-b0965cd049997283976c132fceb9727b6582ca49.zip
Qt-b0965cd049997283976c132fceb9727b6582ca49.tar.gz
Qt-b0965cd049997283976c132fceb9727b6582ca49.tar.bz2
Mac: fix regression from 65a673f that makes some buttons unclickable
If a button has a small gemoetry, the mac style will reender it as flat. Change 65a673f did not take this logic into account when massaging the hit rect of the button. This patch will. Task-number: QTBUG-10401 Reviewed-by: cduclos
Diffstat (limited to 'src/gui/styles/qmacstyle_mac.mm')
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index d18383c..ae90d26 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -1059,6 +1059,16 @@ void QMacStylePrivate::initHIThemePushButton(const QStyleOptionButton *btn,
}
}
+bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option)
+{
+ QMacStyle *macStyle = qobject_cast<QMacStyle *>(pushButton->style());
+ if (!macStyle)
+ return false;
+ HIThemeButtonDrawInfo bdi;
+ macStyle->d->initHIThemePushButton(option, pushButton, kThemeStateActive, &bdi);
+ return bdi.kind == kThemeBevelButton;
+}
+
/**
Creates a HIThemeButtonDrawInfo structure that specifies the correct button
kind and other details to use for drawing the given combobox. Which button