summaryrefslogtreecommitdiff
path: root/plugingui/checkbox.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-11-07 10:39:46 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-11-07 10:39:46 +0100
commita65ca7af57feaf7a4ea73f7e071a72eb9b3a1e24 (patch)
tree6cf9fa3b8b57513b8eae030bdc6e1a18495d7e75 /plugingui/checkbox.cc
parent60109b8a737059058d2b0664c7ea88ec501490f7 (diff)
Refactored Painter.
Diffstat (limited to 'plugingui/checkbox.cc')
-rw-r--r--plugingui/checkbox.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc
index 6d85615..b9468d3 100644
--- a/plugingui/checkbox.cc
+++ b/plugingui/checkbox.cc
@@ -83,32 +83,32 @@ void CheckBox::keyEvent(KeyEvent *e)
void CheckBox::repaintEvent(RepaintEvent *e)
{
- Painter p(this);
+ Painter p(*this);
p.clear();
if(state)
{
- p.drawImage(0, (knob.height() - bg_on.height()) / 2, &bg_on);
+ p.drawImage(0, (knob.height() - bg_on.height()) / 2, bg_on);
if(middle)
{
- p.drawImage((bg_on.width() - knob.width()) / 2 + 1, 0, &knob);
+ p.drawImage((bg_on.width() - knob.width()) / 2 + 1, 0, knob);
}
else
{
- p.drawImage(bg_on.width() - 40 + 2, 0, &knob);
+ p.drawImage(bg_on.width() - 40 + 2, 0, knob);
}
}
else
{
- p.drawImage(0, (knob.height() - bg_off.height()) / 2, &bg_off);
+ p.drawImage(0, (knob.height() - bg_off.height()) / 2, bg_off);
if(middle)
{
- p.drawImage((bg_on.width() - knob.width()) / 2 + 1, 0, &knob);
+ p.drawImage((bg_on.width() - knob.width()) / 2 + 1, 0, knob);
}
else
{
- p.drawImage(0, 0, &knob);
+ p.drawImage(0, 0, knob);
}
}
}