From e269f7ae4066f4f9d80c0a44a231b08d958e0000 Mon Sep 17 00:00:00 2001 From: narunlifescience Date: Mon, 14 Sep 2015 07:38:07 -0500 Subject: [PATCH] const & format --- src/widgets/sliderwidget.cpp | 7 ++++--- src/widgets/sliderwidget.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/widgets/sliderwidget.cpp b/src/widgets/sliderwidget.cpp index 2ecf474b4..b2f92ab9f 100644 --- a/src/widgets/sliderwidget.cpp +++ b/src/widgets/sliderwidget.cpp @@ -338,12 +338,13 @@ void Amarok::VolumeSlider::paletteChange(const QPalette&) { generateGradient(); } -QPixmap Amarok::VolumeSlider::volumePixmapDraw () { - QPixmap pixmap (112, 36); +QPixmap Amarok::VolumeSlider::volumePixmapDraw () const { + QPixmap pixmap(112, 36); pixmap.fill(Qt::transparent); - QPainter painter( &pixmap ); + QPainter painter(&pixmap); QPen pen(palette().color(QPalette::WindowText), 0.3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin); painter.setPen(pen); + painter.setRenderHint(QPainter::Antialiasing); painter.setRenderHint(QPainter::SmoothPixmapTransform); // Draw volume control pixmap diff --git a/src/widgets/sliderwidget.h b/src/widgets/sliderwidget.h index 0b8e9d1c1..00823c0ac 100644 --- a/src/widgets/sliderwidget.h +++ b/src/widgets/sliderwidget.h @@ -98,7 +98,7 @@ class VolumeSlider : public Slider { public: VolumeSlider(QWidget* parent, uint max = 0); - QPixmap volumePixmapDraw(); + QPixmap volumePixmapDraw() const; protected: virtual void paintEvent(QPaintEvent*);