diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-05 18:54:15 +0100 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-06 20:35:07 +0000 |
commit | 00e6863552ab3519e8a9a9ecb6cb56bb6a024041 (patch) | |
tree | dc58c861c44ee7d1822921c63b342f3c254c4e10 /src/widgets/styles/qmacstyle_mac.mm | |
parent | 0884e424106962785b8f2e6742d3590fb3919a97 (diff) |
Add feature.pushbutton
Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac.mm')
-rw-r--r-- | src/widgets/styles/qmacstyle_mac.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 8aace93328..6dcebaaf32 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -75,7 +75,9 @@ #include <qpixmapcache.h> #include <qpointer.h> #include <qprogressbar.h> +#if QT_CONFIG(pushbutton) #include <qpushbutton.h> +#endif #include <qradiobutton.h> #include <qrubberband.h> #include <qscrollbar.h> @@ -663,8 +665,10 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg } if (ct == QStyle::CT_CustomBase && widg) { +#if QT_CONFIG(pushbutton) if (qobject_cast<const QPushButton *>(widg)) ct = QStyle::CT_PushButton; +#endif else if (qobject_cast<const QRadioButton *>(widg)) ct = QStyle::CT_RadioButton; #if QT_CONFIG(checkbox) @@ -704,6 +708,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg } switch (ct) { +#if QT_CONFIG(pushbutton) case QStyle::CT_PushButton: { const QPushButton *psh = qobject_cast<const QPushButton *>(widg); // If this comparison is false, then the widget was not a push button. @@ -746,6 +751,7 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg // Since there's no default size we return the large size... ret = QSize(-1, qt_mac_aqua_get_metric(kThemeMetricPushButtonHeight)); } +#endif #if 0 //Not sure we are applying the rules correctly for RadioButtons/CheckBoxes --Sam } else if (ct == QStyle::CT_RadioButton) { QRadioButton *rdo = static_cast<QRadioButton *>(widg); @@ -1308,6 +1314,7 @@ void QMacStylePrivate::initHIThemePushButton(const QStyleOptionButton *btn, } } +#if QT_CONFIG(pushbutton) bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOptionButton *option) { QMacStyle *macStyle = qobject_cast<QMacStyle *>(pushButton->style()); @@ -1317,6 +1324,7 @@ bool qt_mac_buttonIsRenderedFlat(const QPushButton *pushButton, const QStyleOpti macStyle->d_func()->initHIThemePushButton(option, pushButton, kThemeStateActive, &bdi); return bdi.kind == kThemeBevelButton; } +#endif /** Creates a HIThemeButtonDrawInfo structure that specifies the correct button |