diff --git a/src/ui/linechart/ChartPlot.cc b/src/ui/linechart/ChartPlot.cc index 3ec8f922660545d4832b272dca21845d06666182..665ff5233674f633c6cf324359ae4681020c9620 100644 --- a/src/ui/linechart/ChartPlot.cc +++ b/src/ui/linechart/ChartPlot.cc @@ -53,7 +53,7 @@ ChartPlot::ChartPlot(QWidget *parent): } // Now that all objects have been initialized, color everything. - applyColorScheme(MainWindow::instance()->getStyle()); + styleChanged(MainWindow::instance()->getStyle()); } ChartPlot::~ChartPlot() @@ -87,7 +87,7 @@ void ChartPlot::shuffleColors() } } -void ChartPlot::applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style) +void ChartPlot::styleChanged(MainWindow::QGC_MAINWINDOW_STYLE style) { // Generate a new color list for curves and recolor them. for (int i = 0; i < numColors; ++i) diff --git a/src/ui/linechart/ChartPlot.h b/src/ui/linechart/ChartPlot.h index fad515190a4a2ad56515b3d31070c853956481a7..74a232039ed2ca9bf9be9c2e09a51cd7d0d13c6c 100644 --- a/src/ui/linechart/ChartPlot.h +++ b/src/ui/linechart/ChartPlot.h @@ -25,7 +25,7 @@ public: public slots: /** @brief Generate coloring for this plot canvas based on current window theme */ - void applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style); + void styleChanged(MainWindow::QGC_MAINWINDOW_STYLE style); protected: const static int numColors = 20; diff --git a/src/ui/linechart/LinechartWidget.cc b/src/ui/linechart/LinechartWidget.cc index 2a11f5c296951a8aad91a35838b8e4d046317eaf..e29b655321f24f339aed0d6dfc60ba2a854df252 100644 --- a/src/ui/linechart/LinechartWidget.cc +++ b/src/ui/linechart/LinechartWidget.cc @@ -144,7 +144,7 @@ LinechartWidget::LinechartWidget(int systemid, QWidget *parent) : QWidget(parent // And make sure we're listening for future style changes connect(MainWindow::instance(), SIGNAL(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE)), - this, SLOT(applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE))); + this, SLOT(styleChanged(MainWindow::QGC_MAINWINDOW_STYLE))); connect(MainWindow::instance(), SIGNAL(styleChanged()), this, SLOT(recolor())); updateTimer->setInterval(updateInterval); @@ -777,7 +777,7 @@ void LinechartWidget::removeCurve(QString curve) void LinechartWidget::recolor() { - activePlot->applyColorScheme(MainWindow::instance()->getStyle()); + activePlot->styleChanged(MainWindow::instance()->getStyle()); foreach (QString key, colorIcons.keys()) { QWidget* colorIcon = colorIcons.value(key, 0);