Browse Source

Merge pull request #4135 from Chocobo1/speedplot_color

Fix Speed graph legend is illegible on dark background. Closes #4134.
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
2e3cce6755
  1. 4
      src/gui/properties/speedplotview.cpp

4
src/gui/properties/speedplotview.cpp

@ -230,7 +230,9 @@ void SpeedPlotView::paintEvent(QPaintEvent *) @@ -230,7 +230,9 @@ void SpeedPlotView::paintEvent(QPaintEvent *)
}
QRectF legend_background_rect(legend_top_left, QSizeF(legend_width, legend_height));
painter.fillRect(legend_background_rect, QColor(255, 255, 255, 128)); // 50% transparent
QColor legendBackgroundColor = QWidget::palette().color(QWidget::backgroundRole());
legendBackgroundColor.setAlpha(128); // 50% transparent
painter.fillRect(legend_background_rect, legendBackgroundColor);
int i = 0;
for (QMap<GraphID, GraphProperties>::const_iterator it = m_properties.begin(); it != m_properties.end(); ++it) {

Loading…
Cancel
Save