From 8e05f82174f94511b1c869190e6de0ed0a68e65c Mon Sep 17 00:00:00 2001 From: Bryant Date: Tue, 4 Jun 2013 13:26:51 -0700 Subject: [PATCH] A few more style updates. Added theme awareness to the toolbar. Also switched the plot zoomer over to use blue instead of red as it's selector coloring to match the standard accent color for QGC. --- src/ui/QGCToolBar.cc | 11 +++++++++-- src/ui/linechart/ChartPlot.cc | 8 ++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ui/QGCToolBar.cc b/src/ui/QGCToolBar.cc index a5d266ca7c..4dbb791053 100644 --- a/src/ui/QGCToolBar.cc +++ b/src/ui/QGCToolBar.cc @@ -102,7 +102,7 @@ void QGCToolBar::createUI() toolBarTimeoutLabel->setObjectName("toolBarTimeoutLabel"); addWidget(toolBarTimeoutLabel); - toolBarSafetyLabel = new QLabel("SAFE", this); + toolBarSafetyLabel = new QLabel("----", this); toolBarSafetyLabel->setToolTip(tr("Vehicle safety state")); toolBarSafetyLabel->setAlignment(Qt::AlignCenter); addWidget(toolBarSafetyLabel); @@ -364,7 +364,14 @@ void QGCToolBar::updateView() } else { - toolBarSafetyLabel->setStyleSheet("QLabel {color: #14C814;}"); + if (MainWindow::instance()->getStyle() == MainWindow::QGC_MAINWINDOW_STYLE_LIGHT) + { + toolBarSafetyLabel->setStyleSheet("QLabel {color: #0D820D;}"); + } + else + { + toolBarSafetyLabel->setStyleSheet("QLabel {color: #14C814;}"); + } toolBarSafetyLabel->setText(tr("SAFE")); } diff --git a/src/ui/linechart/ChartPlot.cc b/src/ui/linechart/ChartPlot.cc index 71bee45c3b..1c6ab0793e 100644 --- a/src/ui/linechart/ChartPlot.cc +++ b/src/ui/linechart/ChartPlot.cc @@ -110,8 +110,8 @@ void ChartPlot::applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style) if (style == MainWindow::QGC_MAINWINDOW_STYLE_LIGHT) { // Set the coloring of the area selector for zooming. - zoomer->setRubberBandPen(QPen(Qt::darkRed, zoomerWidth, Qt::DotLine)); - zoomer->setTrackerPen(QPen(Qt::darkRed)); + zoomer->setRubberBandPen(QPen(QColor(0x37, 0x9A, 0xC3), zoomerWidth, Qt::DotLine)); + zoomer->setTrackerPen(QPen(QColor(0x37, 0x9A, 0xC3))); // Set canvas background setCanvasBackground(QColor(0xFF, 0xFF, 0xFF)); @@ -123,8 +123,8 @@ void ChartPlot::applyColorScheme(MainWindow::QGC_MAINWINDOW_STYLE style) else { // Set the coloring of the area selector for zooming. - zoomer->setRubberBandPen(QPen(Qt::red, zoomerWidth, Qt::DotLine)); - zoomer->setTrackerPen(QPen(Qt::red)); + zoomer->setRubberBandPen(QPen(QColor(0xB8, 0xD3, 0xE6), zoomerWidth, Qt::DotLine)); + zoomer->setTrackerPen(QPen(QColor(0xB8, 0xD3, 0xE6))); // Set canvas background setCanvasBackground(QColor(0, 0, 0)); -- GitLab