summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-12-15 12:29:04 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-12-15 12:29:04 (GMT)
commitf6ebcf8eb829d9639daddfc7bfddafe4371be0ef (patch)
treeb63bd867ca0a259e8aea7e50561c31bd0d372ec7 /src/gui/styles/qgtkstyle.cpp
parentda918327fdaaf45774c074d911882141cf77ea7e (diff)
parentd6cd6c59dae36b2890baae98f0bf94b23e5509da (diff)
downloadQt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.zip
Qt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.tar.gz
Qt-f6ebcf8eb829d9639daddfc7bfddafe4371be0ef.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r--src/gui/styles/qgtkstyle.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index afa3325..e10bb41 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -3375,12 +3375,28 @@ QIcon QGtkStyle::standardIconImplementation(StandardPixmap standardIcon,
/*! \reimp */
QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const
{
+ Q_D(const QGtkStyle);
+
QRect r = QCleanlooksStyle::subElementRect(element, option, widget);
switch (element) {
case SE_ProgressBarLabel:
case SE_ProgressBarContents:
case SE_ProgressBarGroove:
return option->rect;
+ case SE_PushButtonContents:
+ if (!d->gtk_check_version(2, 10, 0)) {
+ GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton"));
+ GtkBorder *border = 0;
+ d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL);
+ if (border) {
+ r = option->rect.adjusted(border->left, border->top, -border->right, -border->bottom);
+ d->gtk_border_free(border);
+ } else {
+ r = option->rect.adjusted(1, 1, -1, -1);
+ }
+ r = visualRect(option->direction, option->rect, r);
+ }
+ break;
default:
break;
}