summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widget/woverview.cpp8
-rw-r--r--src/widget/woverview.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/src/widget/woverview.cpp b/src/widget/woverview.cpp
index 405f41b8d5..59dfdc218b 100644
--- a/src/widget/woverview.cpp
+++ b/src/widget/woverview.cpp
@@ -90,6 +90,8 @@ void WOverview::setup(const QDomNode& node, const SkinContext& context) {
m_signalColors.setup(node, context);
m_qColorBackground = m_signalColors.getBgColor();
+ m_labelBackgroundColor = m_qColorBackground;
+ m_labelBackgroundColor.setAlpha(128);
// Clear the background pixmap, if it exists.
m_backgroundPixmap = QPixmap();
@@ -900,10 +902,8 @@ void WOverview::drawTimeRuler(QPainter* pPainter) {
QString timeText = mixxx::Duration::formatTime(timePosition)
+ " -" + mixxx::Duration::formatTime(timePositionTillEnd);
- QColor bgColor = m_qColorBackground;
- bgColor.setAlpha(128);
m_timeRulerPositionLabel.prerender(textPoint, QPixmap(), timeText,
- markerFont, Qt::white, bgColor, width(), getDevicePixelRatioF(this));
+ markerFont, Qt::white, m_labelBackgroundColor, width(), getDevicePixelRatioF(this));
m_timeRulerPositionLabel.draw(pPainter);
QString timeDistanceText;
@@ -911,7 +911,7 @@ void WOverview::drawTimeRuler(QPainter* pPainter) {
timeDistanceText = mixxx::Duration::formatTime(timeDistance);
}
m_timeRulerDistanceLabel.prerender(textPointDistance, QPixmap(), timeDistanceText,
- markerFont, Qt::white, bgColor, width(), getDevicePixelRatioF(this));
+ markerFont, Qt::white, m_labelBackgroundColor, width(), getDevicePixelRatioF(this));
m_timeRulerDistanceLabel.draw(pPainter);
} else {
m_timeRulerPositionLabel.clear();
diff --git a/src/widget/woverview.h b/src/widget/woverview.h
index a13c69093b..6716781ece 100644
--- a/src/widget/woverview.h
+++ b/src/widget/woverview.h
@@ -159,6 +159,7 @@ class WOverview : public WWidget, public TrackDropTarget {
QPixmap m_backgroundPixmap;
QString m_backgroundPixmapPath;
QColor m_qColorBackground;
+ QColor m_labelBackgroundColor;
QColor m_endOfTrackColor;
PredefinedColorsRepresentation m_predefinedColorsRepresentation;