summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstylesheetstyle
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-09-23 14:52:08 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-09-23 15:22:19 +0200
commite97b99f249ed65c6cedfc23f751a9834641271cb (patch)
treed8120b28fb710ccf4e687ad35659718709edaad7 /tests/auto/qstylesheetstyle
parent2966b2a95b0d7d161a6dc1a6edab3d6aa6edf004 (diff)
Added QSlider to tst_QStyleSheetStyle::complexWidgetFocus.
When using style sheets, QSlider::handle couldn't be customized if QSlider::groove wasn't. QComboBox::down-arrow:focus wasn't properly drawn. Reviewed-by: Olivier
Diffstat (limited to 'tests/auto/qstylesheetstyle')
-rw-r--r--tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
index e8fbd86ea8..50bb84648c 100644
--- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
+++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp
@@ -1459,16 +1459,15 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
// For this reason, we use unusual and extremely ugly colors! :-)
QDialog frame;
- // We only want to test the buttons colors.
frame.setStyleSheet("*:focus { background: black; color: black } "
- "QSpinBox::up-button:focus, QSpinBox::down-button:focus { width: 15px; height: 15px; background: #e8ff66; color: #ff0084 } "
"QSpinBox::up-arrow:focus, QSpinBox::down-arrow:focus { width: 7px; height: 7px; background: #ff0084 } "
- "QComboBox::drop-down:focus { background: #e8ff66; color: #ff0084 } "
- "QComboBox::down-arrow:focus { width: 7px; height: 7px; background: #ff0084; color: #e8ff66 }");
+ "QComboBox::down-arrow:focus { width: 7px; height: 7px; background: #ff0084 }"
+ "QSlider::handle:horizontal:focus { width: 7px; height: 7px; background: #ff0084 } ");
QList<QWidget *> widgets;
widgets << new QSpinBox;
widgets << new QComboBox;
+ widgets << new QSlider(Qt::Horizontal);
QLayout* layout = new QGridLayout;
layout->addWidget(new QLineEdit); // Avoids initial focus.
@@ -1489,11 +1488,6 @@ void tst_QStyleSheetStyle::complexWidgetFocus()
QSKIP("Test doesn't support color depth < 24", SkipAll);
}
- QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)),
- (QString::fromLatin1(widget->metaObject()->className())
- + " did not contain background color #e8ff66, using style "
- + QString::fromLatin1(qApp->style()->metaObject()->className()))
- .toLocal8Bit().constData());
QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)),
(QString::fromLatin1(widget->metaObject()->className())
+ " did not contain text color #ff0084, using style "