diff --git a/src/widgets/sliderwidget.cpp b/src/widgets/sliderwidget.cpp index b2f92ab9f..1c7071f45 100644 --- a/src/widgets/sliderwidget.cpp +++ b/src/widgets/sliderwidget.cpp @@ -198,6 +198,8 @@ Amarok::VolumeSlider::VolumeSlider(QWidget* parent, uint max) m_pixmapInset(QPixmap(volumePixmapDraw ())) { setFocusPolicy(Qt::NoFocus); + WindowText_color = palette().color(QPalette::WindowText); + // BEGIN Calculate handle animation pixmaps for mouse-over effect QImage pixmapHandle(":volumeslider-handle.png"); QImage pixmapHandleGlow(":volumeslider-handle_glow.png"); @@ -301,7 +303,10 @@ void Amarok::VolumeSlider::paintEvent(QPaintEvent*) { const int padding = 7; const int offset = int(double((width() - 2 * padding) * value()) / maximum()); - m_pixmapInset = volumePixmapDraw(); + if (WindowText_color != palette().color(QPalette::WindowText)) { + m_pixmapInset = volumePixmapDraw(); + WindowText_color = palette().color(QPalette::WindowText); + } p.drawPixmap(0, 0, m_pixmapGradient, 0, 0, offset + padding, 0); p.drawPixmap(0, 0, m_pixmapInset); diff --git a/src/widgets/sliderwidget.h b/src/widgets/sliderwidget.h index 00823c0ac..218e42be9 100644 --- a/src/widgets/sliderwidget.h +++ b/src/widgets/sliderwidget.h @@ -130,6 +130,8 @@ class VolumeSlider : public Slider { QPixmap m_pixmapInset; QPixmap m_pixmapGradient; + QColor WindowText_color; + QList m_handlePixmaps; }; }