From 3dc2625e2a478dfe9b5b916f6f5688548a5c2ee2 Mon Sep 17 00:00:00 2001 From: Titta Heikkala Date: Wed, 2 Oct 2013 14:42:27 +0300 Subject: 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 --- tests/auto/qchart/tst_qchart.cpp | 1 + tests/chartviewer/window.cpp | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'tests') 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)); -- cgit v1.2.3