diff --git a/files/styles/style-dark.css b/files/styles/style-dark.css index 3534bd57ddfb4e26075abf7e6ca564944c565813..11ef7aa7cd7a2375022df32f050df4d240e483f4 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 33ddbc5d0f1a35e19555903b3c43b36de81ee84d..1081eeac462144046a17c0f5663d716a6a3c8673 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 0b5a33cd0514f7632775bdaf181b5df85f83cc9c..20f7649e71a0b61d1a1effbce2342b24a10a302f 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 df20d7361c38fc0d4c53c98019f28f4de7794eb1..647461ecf096f8e4b80a329be101ea5c345e277a 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 c4af8643b7c6535722b50e54d9576c617c40136c..8f605e1ee3a30fe5f1b37864d7d30f98d78a7b2a 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); +}