summaryrefslogtreecommitdiffstats
path: root/src/qt3support
diff options
context:
space:
mode:
authorKevin Ottens <ervin@kde.org>2010-05-04 08:48:00 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2010-05-04 12:18:22 (GMT)
commit62db1b73220b77e1e424e76cae35aaddf2a0709d (patch)
tree2a34c484e132021950ac68ce25bb551131ae8dbe /src/qt3support
parentca6ed3ab4ebdb4d8f365294a61662edd8da22d34 (diff)
downloadQt-62db1b73220b77e1e424e76cae35aaddf2a0709d.zip
Qt-62db1b73220b77e1e424e76cae35aaddf2a0709d.tar.gz
Qt-62db1b73220b77e1e424e76cae35aaddf2a0709d.tar.bz2
When one of the spin button subcontrol is activated, the state member of
the style option object should have QStyle::State_Sunken set in order for styles to paint the button as pressed. Merge-Request: 607 Reviewed-by: Andreas
Diffstat (limited to 'src/qt3support')
-rw-r--r--src/qt3support/widgets/q3spinwidget.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt3support/widgets/q3spinwidget.cpp b/src/qt3support/widgets/q3spinwidget.cpp
index 3dc36c5..3bfad06 100644
--- a/src/qt3support/widgets/q3spinwidget.cpp
+++ b/src/qt3support/widgets/q3spinwidget.cpp
@@ -340,11 +340,13 @@ void Q3SpinWidget::paintEvent(QPaintEvent *)
QPainter p(this);
QStyleOptionSpinBox opt = getStyleOption(this);
- if (d->theButton & 1)
+ if (d->theButton & 1) {
opt.activeSubControls = QStyle::SC_SpinBoxDown;
- else if (d->theButton & 2)
+ opt.state |= QStyle::State_Sunken;
+ } else if (d->theButton & 2) {
opt.activeSubControls = QStyle::SC_SpinBoxUp;
- else
+ opt.state |= QStyle::State_Sunken;
+ } else
opt.activeSubControls = QStyle::SC_None;
opt.rect = style()->subControlRect(QStyle::CC_SpinBox, &opt, QStyle::SC_SpinBoxFrame, this);
opt.subControls = QStyle::SC_All;