From a65ca7af57feaf7a4ea73f7e071a72eb9b3a1e24 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 7 Nov 2015 10:39:46 +0100 Subject: Refactored Painter. --- plugingui/progressbar.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugingui/progressbar.cc') diff --git a/plugingui/progressbar.cc b/plugingui/progressbar.cc index 3b821bb..f834fc4 100644 --- a/plugingui/progressbar.cc +++ b/plugingui/progressbar.cc @@ -71,14 +71,14 @@ void GUI::ProgressBar::setProgress(float progress) void GUI::ProgressBar::repaintEvent(GUI::RepaintEvent *e) { - Painter p(this); + Painter p(*this); int max = width() * _progress; p.clear(); int brd = 4; - p.drawBar(0, 0, &bar_bg, width(), height()); + p.drawBar(0, 0, bar_bg, width(), height()); GUI::Painter::Bar *b = NULL; switch(state) { @@ -87,7 +87,7 @@ void GUI::ProgressBar::repaintEvent(GUI::RepaintEvent *e) case blue: b = &bar_blue; break; default: break; } - if(b) p.drawBar(brd, 0, b, max - 2*brd, height()); + if(b) p.drawBar(brd, 0, *b, max - 2*brd, height()); } #ifdef TEST_PROGRESSBAR -- cgit v1.2.3