Remove icons from buttons with Cleanlooks
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>
Tue, 21 Aug 2012 15:26:42 +0000 (17:26 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Aug 2012 20:25:31 +0000 (22:25 +0200)
The icon buttons in cleanlooks were modeled after an early version of
the Gtk 2.0 Clearlooks theme. At the time, GNOME was using
icons on all buttons. For the past couple of years, GNOME has dropped
icons on buttons by default and as this is the common behavior on
other platforms as well, I think it is time to remove them.

The button size hack was also removed due to previously emulating
a GNOME behavior. The end result at the moment is only that it makes
the button height inconsistent with other widgets.

Change-Id: I22fe8c0b3a799a807cfff74a81cebf50e8ec33d3
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
src/widgets/styles/qcleanlooksstyle.cpp

index d617ee7..c648f74 100644 (file)
@@ -3790,12 +3790,6 @@ QSize QCleanlooksStyle::sizeFromContents(ContentsType type, const QStyleOption *
                 newSize -= QSize(0, 2);
             newSize += QSize(0, 1);
         }
-        if (const QPushButton *button = qobject_cast<const QPushButton *>(widget)) {
-            if (qobject_cast<const QDialogButtonBox *>(button->parentWidget())) {
-                if (newSize.height() < 32)
-                    newSize.setHeight(32);
-            }
-        }
         break;
 #ifndef QT_NO_GROUPBOX
     case CT_GroupBox:
@@ -4337,7 +4331,7 @@ int QCleanlooksStyle::styleHint(StyleHint hint, const QStyleOption *option, cons
         ret = Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse;
         break;
     case SH_DialogButtonBox_ButtonsHaveIcons:
-        ret = true;
+        ret = false;
         break;
     case SH_MessageBox_CenterButtons:
         ret = false;