summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-10 06:04:25 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-10 06:04:25 (GMT)
commit4768a1ee67945e09d7f94cf881eb9c4a56e9c969 (patch)
tree938783a50f745c16156a15a0323c344b38ef90f9 /src/gui/styles/qgtkstyle.cpp
parenta02104fec44e2ea1953f73881d4d6c6cf12974e4 (diff)
parent94d45cc06dabb8b1f8fc98e9f9b3dfaf49d0c4d7 (diff)
downloadQt-4768a1ee67945e09d7f94cf881eb9c4a56e9c969.zip
Qt-4768a1ee67945e09d7f94cf881eb9c4a56e9c969.tar.gz
Qt-4768a1ee67945e09d7f94cf881eb9c4a56e9c969.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
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;
}