diff options
author | Sami Merilä <sami.merila@nokia.com> | 2009-05-15 10:58:25 (GMT) |
---|---|---|
committer | Sami Merilä <sami.merila@nokia.com> | 2009-05-15 10:58:25 (GMT) |
commit | 4a964c6a6e715e4a66e84edf7e564872e5c8f7ed (patch) | |
tree | c4a960f513d4f279e364c3e10fc31732387a4cf9 /src/gui/styles/qs60style.cpp | |
parent | 2dab6c554a53c14f58b598ef062c7592821de405 (diff) | |
download | Qt-4a964c6a6e715e4a66e84edf7e564872e5c8f7ed.zip Qt-4a964c6a6e715e4a66e84edf7e564872e5c8f7ed.tar.gz Qt-4a964c6a6e715e4a66e84edf7e564872e5c8f7ed.tar.bz2 |
S60Style: Make button content area slightly larger if button is 'checkable button'.
Diffstat (limited to 'src/gui/styles/qs60style.cpp')
-rw-r--r-- | src/gui/styles/qs60style.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 5be7fe8..caac359 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2258,6 +2258,12 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, { QSize sz(csz); switch (ct) { + case CT_PushButton: + sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); + if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget))) + if (buttonWidget->isCheckable()) + sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0); + break; case CT_LineEdit: if (const QStyleOptionFrame *f = qstyleoption_cast<const QStyleOptionFrame *>(opt)) sz += QSize(2*f->lineWidth, 4*f->lineWidth); |