summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qwindowsstyle.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-03-29 14:22:43 +0200
committerJens Bache-Wiig <jbache@trolltech.com>2010-03-29 14:26:42 +0200
commit0e73e97548be067035dd5038b329abd50ecb3bf3 (patch)
tree046173cc4f0ec5491f71d7ce58809c7383f191b7 /src/gui/styles/qwindowsstyle.cpp
parent1eb54209adca3ed93426598c1dcf51ca4ba675be (diff)
Support EtchDisabledText with spin box on Windows style
Reviewed-by: ogoffart Task-number: QTBUG-7525
Diffstat (limited to 'src/gui/styles/qwindowsstyle.cpp')
-rw-r--r--src/gui/styles/qwindowsstyle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp
index 60c06ca7d0..1653baa6f7 100644
--- a/src/gui/styles/qwindowsstyle.cpp
+++ b/src/gui/styles/qwindowsstyle.cpp
@@ -3105,7 +3105,9 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
&copy.palette.brush(QPalette::Button));
copy.rect.adjust(4, 1, -5, -1);
- if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled) ) {
+ if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepUpEnabled))
+ && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
+ {
QStyleOptionSpinBox lightCopy = copy;
lightCopy.rect.adjust(1, 1, 1, 1);
lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());
@@ -3138,7 +3140,9 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp
qDrawWinButton(p, copy.rect, shadePal, copy.state & (State_Sunken | State_On),
&copy.palette.brush(QPalette::Button));
copy.rect.adjust(4, 0, -5, -1);
- if (!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled) ) {
+ if ((!enabled || !(sb->stepEnabled & QAbstractSpinBox::StepDownEnabled))
+ && proxy()->styleHint(SH_EtchDisabledText, opt, widget) )
+ {
QStyleOptionSpinBox lightCopy = copy;
lightCopy.rect.adjust(1, 1, 1, 1);
lightCopy.palette.setBrush(QPalette::ButtonText, copy.palette.light());