summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-08 16:09:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-08 16:09:48 (GMT)
commitbaf60d049cc11a54f156b69960706d7304fc4640 (patch)
tree617f63b98d841fea6126c30a026fcfb3d8ee4b02 /src/gui/styles
parent2ae808a23ce05bf9768ad9df107c16bb0c555ee7 (diff)
parentdcb9b85376718d768f538e19ae231f5e061b7b31 (diff)
downloadQt-baf60d049cc11a54f156b69960706d7304fc4640.zip
Qt-baf60d049cc11a54f156b69960706d7304fc4640.tar.gz
Qt-baf60d049cc11a54f156b69960706d7304fc4640.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (29 commits) I10n: Update German translations for 4.7.0 Fix a freetype link failure. Fix configure test for DirectFB Split Symbian bearer plugin into three platform specfic plugins Doc: Fixed whitespace in the other configuration file for zh_CN. Doc: Fixed whitespace in the Simplified Chinese doc configuration. Unbreak Linux build when qendian.h is included before qglobal.h Revert accidental commit of irrelevant stuff. Silly mondays.. Unbreak Linux build when qendian.h is included before qglobal.h Fix QApplication/QWidget to really take ownership of input contexts Added setting a hotspot on standard gestures Fixed GestureOverride event delivery in GraphicsView. add check-ts target to auto-asses translation completeness qt_ja_JP.ts => qt_ja.ts Fix incorrect \since tag XQuery test suite (and others): remove p4 dependency add docu about pixmaps being invalidated on qapp destruction remove somewhat misleading warning about x11 pixmap leak Disabled item view items use incorrect background color Update the mkspec for linux-icc: don't use jump tables in shlibs ...
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qcommonstyle.cpp4
-rw-r--r--src/gui/styles/qgtkstyle.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 4978565..039a6da 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -762,7 +762,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
#ifndef QT_NO_ITEMVIEWS
case PE_PanelItemViewRow:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
@@ -775,7 +775,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
break;
case PE_PanelItemViewItem:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
- QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled
+ QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled))
? QPalette::Normal : QPalette::Disabled;
if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active))
cg = QPalette::Inactive;
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);