summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2010-03-29 12:22:43 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2010-03-29 12:26:42 (GMT)
commit0e73e97548be067035dd5038b329abd50ecb3bf3 (patch)
tree046173cc4f0ec5491f71d7ce58809c7383f191b7 /src/gui
parent1eb54209adca3ed93426598c1dcf51ca4ba675be (diff)
downloadQt-0e73e97548be067035dd5038b329abd50ecb3bf3.zip
Qt-0e73e97548be067035dd5038b329abd50ecb3bf3.tar.gz
Qt-0e73e97548be067035dd5038b329abd50ecb3bf3.tar.bz2
Support EtchDisabledText with spin box on Windows style
Reviewed-by: ogoffart Task-number: QTBUG-7525
Diffstat (limited to 'src/gui')
-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 60c06ca..1653baa 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());