summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-07-17 11:59:52 (GMT)
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-07-17 11:59:52 (GMT)
commit8038173382933ead65631c2f8f78f46c066f66ee (patch)
treedb278649e43f79d8771336db2716a6befee5e314 /src/gui/styles/qgtkstyle.cpp
parent587de884fadba615f86154747e116c8d6cd196e3 (diff)
parent68c0e6a8ba1e92bf0152adcaa86eebb83dcfd1d8 (diff)
downloadQt-8038173382933ead65631c2f8f78f46c066f66ee.zip
Qt-8038173382933ead65631c2f8f78f46c066f66ee.tar.gz
Qt-8038173382933ead65631c2f8f78f46c066f66ee.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r--src/gui/styles/qgtkstyle.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index 9d5a3bc..b6ef4c9 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -599,6 +599,26 @@ int QGtkStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidg
break;
+ case SH_ToolButtonStyle:
+ {
+ if (QGtk::isKDE4Session())
+ return QCleanlooksStyle::styleHint(hint, option, widget, returnData);
+ GtkWidget *gtkToolbar = QGtk::gtkWidget(QLS("GtkToolbar"));
+ GtkToolbarStyle toolbar_style = GTK_TOOLBAR_ICONS;
+ g_object_get(gtkToolbar, "toolbar-style", &toolbar_style, NULL);
+ switch (toolbar_style) {
+ case GTK_TOOLBAR_TEXT:
+ return Qt::ToolButtonTextOnly;
+ case GTK_TOOLBAR_BOTH:
+ return Qt::ToolButtonTextUnderIcon;
+ case GTK_TOOLBAR_BOTH_HORIZ:
+ return Qt::ToolButtonTextBesideIcon;
+ case GTK_TOOLBAR_ICONS:
+ default:
+ return Qt::ToolButtonIconOnly;
+ }
+ }
+ break;
case SH_SpinControls_DisableOnBounds:
return int(true);