diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 19:34:57 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-10 19:34:57 (GMT) |
commit | e6e06e7ffc7a08368af79e1d2ed442e3c0df936c (patch) | |
tree | 731d8c8521a5f859a183fc9443fbf6c286b39389 /src/gui/styles | |
parent | 497da277770ccf37e05a7b519afd5206601a7cf1 (diff) | |
parent | 9385f050620f14e3c3e4616906cf1999bf166041 (diff) | |
download | Qt-e6e06e7ffc7a08368af79e1d2ed442e3c0df936c.zip Qt-e6e06e7ffc7a08368af79e1d2ed442e3c0df936c.tar.gz Qt-e6e06e7ffc7a08368af79e1d2ed442e3c0df936c.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: (42 commits)
Replaced redundant "!contains" scopes in "contains(A, B) {...} !contains(A, B) {...}" constructions with "else"
Updated leading whitespace to make indentation more consistent
Updated project files so it is now possible to use "-system-zlib" configuration option on Windows and Symbian platforms.
make postgresql support sensitive to PSQL_LIBS
support for cross building Qt for MinGW (win32-g++) on Unix
use "win32-g++*" scope to match all MinGW makespecs
Demos: Fix compilation with namespace.
actually fix namespaced compile
Attempt to fix build failure on Linux introduced by 09c6a81109
minor cosmetic improvements
designer: add sorting in signal-slot editor window
deprecate header files in $$QT_BUILD_TREE/include/Qt
syncqt: change tabs to spaces
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
...
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 4 | ||||
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 3 |
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); |