diff options
author | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-17 07:21:05 (GMT) |
---|---|---|
committer | Geir Vattekar <geir.vattekar@nokia.com> | 2010-06-17 07:21:05 (GMT) |
commit | f39c9f38276add6ead9bb5d380cc2b32b0fa3390 (patch) | |
tree | 2627db65ca9cddb432232ee21116afea73da07a4 /src/gui/styles/qgtkstyle.cpp | |
parent | 594900e68f8e264facbe8c75eaf2b857240bc072 (diff) | |
parent | fac227f609e544f8f55aca8447b4328d6534407a (diff) | |
download | Qt-f39c9f38276add6ead9bb5d380cc2b32b0fa3390.zip Qt-f39c9f38276add6ead9bb5d380cc2b32b0fa3390.tar.gz Qt-f39c9f38276add6ead9bb5d380cc2b32b0fa3390.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'src/gui/styles/qgtkstyle.cpp')
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index b59a033..c989bd3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -855,9 +855,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, key = QLS("a"); GTK_WIDGET_SET_FLAGS(gtkTreeView, GTK_HAS_FOCUS); } + bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)); gtkPainter.paintFlatBox(gtkTreeView, detail, option->rect, option->state & State_Selected ? GTK_STATE_SELECTED : - option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, + isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_OUT, gtkTreeView->style, key); if (isActive ) GTK_WIDGET_UNSET_FLAGS(gtkTreeView, GTK_HAS_FOCUS); |