##// END OF EJS Templates
Removed chart view background
Tero Ahola -
r598:73bc9555ba68
parent child
Show More
@@ -328,15 +328,6 void QChartView::keyPressEvent(QKeyEvent *event)
328 */
328 */
329 void QChartView::setChartTheme(QChart::ChartTheme theme)
329 void QChartView::setChartTheme(QChart::ChartTheme theme)
330 {
330 {
331 if (theme == QChart::ChartThemeBlueCerulean) {
332 QLinearGradient backgroundGradient;
333 backgroundGradient.setColorAt(0.0, QRgb(0x056188));
334 backgroundGradient.setColorAt(1.0, QRgb(0x101a33));
335 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
336 setBackgroundBrush(backgroundGradient);
337 } else {
338 setBackgroundBrush(Qt::NoBrush);
339 }
340 m_chart->setChartTheme(theme);
331 m_chart->setChartTheme(theme);
341 }
332 }
342
333
@@ -13,8 +13,12 public:
13 m_seriesColors << QRgb(0x4fbef3);
13 m_seriesColors << QRgb(0x4fbef3);
14 generateSeriesGradients();
14 generateSeriesGradients();
15
15
16 // No chart background, chart view specifies a background
16 // Background
17 // TODO: what if the chart is drawn on custom graphics scene instead of QChartView?
17 QLinearGradient backgroundGradient;
18 backgroundGradient.setColorAt(0.0, QRgb(0x056188));
19 backgroundGradient.setColorAt(1.0, QRgb(0x101a33));
20 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
21 m_chartBackgroundGradient = backgroundGradient;
18
22
19 // Axes and other
23 // Axes and other
20 m_masterFont = QFont();
24 m_masterFont = QFont();
General Comments 0
You need to be logged in to leave comments. Login now