summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@digia.com>2013-10-02 14:42:27 +0300
committerTitta Heikkala <titta.heikkala@digia.com>2013-10-04 09:46:48 +0300
commit3dc2625e2a478dfe9b5b916f6f5688548a5c2ee2 (patch)
tree7248782bd3f3a50b3c6a8e97a82b957bfd54e6e4 /tests
parenta37605d126b677760676fa48fc956ef26c24bed9 (diff)
Add new Qt theme template
Added new theme template ChartThemeQt. The colors are the ones used in official Qt documentation. Task-number: QTRD-1924 Change-Id: I2bb2d33b0198cad6275244d2e815908a2db033a3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qchart/tst_qchart.cpp1
-rw-r--r--tests/chartviewer/window.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qchart/tst_qchart.cpp b/tests/auto/qchart/tst_qchart.cpp
index 4749bd4e..6035fd76 100644
--- a/tests/auto/qchart/tst_qchart.cpp
+++ b/tests/auto/qchart/tst_qchart.cpp
@@ -719,6 +719,7 @@ void tst_QChart::theme_data()
QTest::newRow("ChartThemeDark") << QChart::ChartThemeDark;
QTest::newRow("hartThemeHighContrast") << QChart::ChartThemeHighContrast;
QTest::newRow("ChartThemeLight") << QChart::ChartThemeLight;
+ QTest::newRow("ChartThemeQt") << QChart::ChartThemeQt;
}
void tst_QChart::theme()
diff --git a/tests/chartviewer/window.cpp b/tests/chartviewer/window.cpp
index 4e3db744..628fcca1 100644
--- a/tests/chartviewer/window.cpp
+++ b/tests/chartviewer/window.cpp
@@ -163,6 +163,7 @@ QComboBox *Window::createThemeBox()
themeComboBox->addItem("Blue NCS", QChart::ChartThemeBlueNcs);
themeComboBox->addItem("High Contrast", QChart::ChartThemeHighContrast);
themeComboBox->addItem("Blue Icy", QChart::ChartThemeBlueIcy);
+ themeComboBox->addItem("Qt", QChart::ChartThemeQt);
return themeComboBox;
}
@@ -410,6 +411,9 @@ void Window::checkTheme()
} else if (theme == QChart::ChartThemeBlueIcy) {
pal.setColor(QPalette::Window, QRgb(0xcee7f0));
pal.setColor(QPalette::WindowText, QRgb(0x404044));
+ } else if (theme == QChart::ChartThemeQt) {
+ pal.setColor(QPalette::Window, QRgb(0xf0f0f0));
+ pal.setColor(QPalette::WindowText, QRgb(0x404044));
} else {
pal.setColor(QPalette::Window, QRgb(0xf0f0f0));
pal.setColor(QPalette::WindowText, QRgb(0x404044));