diff options
author | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-10-01 10:40:44 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jens.bache-wiig@nokia.com> | 2010-10-01 10:40:44 (GMT) |
commit | 19085117bfece0709c996ed445a476add4f6815b (patch) | |
tree | 1ba5aa45e26941a77489cb1dbf1a118a8c18c9c0 /src/gui/styles/qgtkstyle.cpp | |
parent | 4ee6f86baccd7c5ba065fd00d22120e71e1f6d3a (diff) | |
download | Qt-19085117bfece0709c996ed445a476add4f6815b.zip Qt-19085117bfece0709c996ed445a476add4f6815b.tar.gz Qt-19085117bfece0709c996ed445a476add4f6815b.tar.bz2 |
Fix focus appearance of tabwidget tabs with QGtkStyle
There was an issue with ubuntu Ambience theme since it requires
a custom tab style. This was not currently supported by
QGtkStyle.
Task-number: QTBUG-14161
Reviewed-by: thorbjorn
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 7f342f9..9cc64b3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -803,10 +803,13 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, // ### this mess should move to subcontrolrect QRect frameRect = option->rect.adjusted(1, 1, -1, -2); - if (qobject_cast<const QTabBar*>(widget)) - frameRect.adjust(-1, 1, 1, 1); - - gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style); + if (qobject_cast<const QTabBar*>(widget)) { + GtkWidget *gtkNotebook = d->gtkWidget("GtkNotebook"); + style = gtkPainter.getStyle(gtkNotebook); + gtkPainter.paintFocus(gtkNotebook, "tab", frameRect.adjusted(-1, 1, 1, 1), GTK_STATE_ACTIVE, style); + } else { + gtkPainter.paintFocus(NULL, "tab", frameRect, GTK_STATE_ACTIVE, style); + } } break; |