diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-22 08:34:44 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2009-10-22 08:34:44 (GMT) |
commit | 5f8978a02bde7f84dc48b63d3722b925730790f0 (patch) | |
tree | 8aa86240643e5d8f7f523f1a5f0e2d567367f4fa /src/gui/styles | |
parent | 58574ea3590fbb28da5be73b983d83f0a8824d00 (diff) | |
download | Qt-5f8978a02bde7f84dc48b63d3722b925730790f0.zip Qt-5f8978a02bde7f84dc48b63d3722b925730790f0.tar.gz Qt-5f8978a02bde7f84dc48b63d3722b925730790f0.tar.bz2 |
move default QAbstractButton font setup on Win mobile to QApplication
The original approach of modifying the font for QAbstractButtons in
QWindowsMobileStyle::polish broke the autotest
tst_qstylesheetstyle::fontPropagation.
Reviewed-by: thartman
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qwindowsmobilestyle.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/gui/styles/qwindowsmobilestyle.cpp b/src/gui/styles/qwindowsmobilestyle.cpp index 32e39b2..f04a4b2 100644 --- a/src/gui/styles/qwindowsmobilestyle.cpp +++ b/src/gui/styles/qwindowsmobilestyle.cpp @@ -3130,34 +3130,11 @@ void QWindowsMobileStyle::polish(QWidget *widget) { else #endif //QT_NO_TOOLBAR -#ifndef QT_NO_PROPERTIES - if (QAbstractButton *pushButton = qobject_cast<QAbstractButton*>(widget)) { - QVariant oldFont = widget->property("_q_styleWindowsMobileFont"); - if (!oldFont.isValid()) { - QFont f = pushButton->font(); - widget->setProperty("_q_styleWindowsMobileFont", f); - f.setBold(true); - int p = f.pointSize(); - if (p > 2) - f.setPointSize(p-1); - pushButton->setFont(f); - } - } -#endif - QWindowsStyle::polish(widget); + QWindowsStyle::polish(widget); } void QWindowsMobileStyle::unpolish(QWidget *widget) { -#ifndef QT_NO_PROPERTIES - if (QAbstractButton *pushButton = qobject_cast<QAbstractButton*>(widget)) { - QVariant oldFont = widget->property("_q_styleWindowsMobileFont"); - if (oldFont.isValid()) { - widget->setFont(qVariantValue<QFont>(oldFont)); - widget->setProperty("_q_styleWindowsMobileFont", QVariant()); - } - } -#endif QWindowsStyle::unpolish(widget); } |