diff --git a/files/styles/style-dark.css b/files/styles/style-dark.css index 3534bd5..11ef7aa 100644 --- a/files/styles/style-dark.css +++ b/files/styles/style-dark.css @@ -70,6 +70,18 @@ QDockWidget::title { height: 14px; } +QGCMAVLinkLogPlayer { + background: none; +} + +QGCMAVLinkLogPlayer QLabel { + color: #FFF; +} + +QGCMAVLinkLogPlayer QLabel:disabled { + color: #AAA; +} + QGCToolBar QLabel { font-size: 10pt; margin: 3px 2px; @@ -182,6 +194,7 @@ QMenu::item:selected, QMenu::item:checked:selected { QMenu::item:checked { background-color: #B8D3E6; + color: #000; } QMenu::separator { @@ -329,7 +342,7 @@ QSlider::groove:horizontal { QSlider::groove:horizontal:disabled { border: 1px solid #454545; - background-color: #CCC; + background-color: #4A4A4A; height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ margin: 2px 0; } diff --git a/files/styles/style-light.css b/files/styles/style-light.css index 33ddbc5..1081eea 100644 --- a/files/styles/style-light.css +++ b/files/styles/style-light.css @@ -70,6 +70,18 @@ QDockWidget::title { height: 14px; } +QGCMAVLinkLogPlayer { + background: none; +} + +QGCMAVLinkLogPlayer QLabel { + color: #FFF; +} + +QGCMAVLinkLogPlayer QLabel:disabled { + color: #666; +} + QGCToolBar QLabel { font-size: 10pt; margin: 3px 2px; @@ -329,7 +341,7 @@ QSlider::groove:horizontal { } QSlider::groove:horizontal:disabled { - border: 1px solid #454545; + border: 1px solid #999; background-color: #CCC; height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ margin: 2px 0; diff --git a/src/ui/QGCMAVLinkLogPlayer.cc b/src/ui/QGCMAVLinkLogPlayer.cc index 0b5a33c..20f7649 100644 --- a/src/ui/QGCMAVLinkLogPlayer.cc +++ b/src/ui/QGCMAVLinkLogPlayer.cc @@ -561,3 +561,14 @@ void QGCMAVLinkLogPlayer::changeEvent(QEvent *e) break; } } + +/** + * Implement paintEvent() so that stylesheets work for our custom widget. + */ +void QGCMAVLinkLogPlayer::paintEvent(QPaintEvent *) +{ + QStyleOption opt; + opt.init(this); + QPainter p(this); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); +} \ No newline at end of file diff --git a/src/ui/QGCMAVLinkLogPlayer.h b/src/ui/QGCMAVLinkLogPlayer.h index df20d73..647461e 100644 --- a/src/ui/QGCMAVLinkLogPlayer.h +++ b/src/ui/QGCMAVLinkLogPlayer.h @@ -99,6 +99,7 @@ protected: private: Ui::QGCMAVLinkLogPlayer *ui; + virtual void paintEvent(QPaintEvent *); }; #endif // QGCMAVLINKLOGPLAYER_H diff --git a/src/ui/uas/UASView.cc b/src/ui/uas/UASView.cc index c4af864..8f605e1 100644 --- a/src/ui/uas/UASView.cc +++ b/src/ui/uas/UASView.cc @@ -722,9 +722,9 @@ void UASView::changeEvent(QEvent *e) * Implement paintEvent() so that stylesheets work for our custom widget. */ void UASView::paintEvent(QPaintEvent *) - { - QStyleOption opt; - opt.init(this); - QPainter p(this); - style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); - } +{ + QStyleOption opt; + opt.init(this); + QPainter p(this); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); +}