summaryrefslogtreecommitdiff
path: root/plugingui/checkbox.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-05-02 13:17:18 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-05-02 13:17:18 +0200
commitc9134d86d393e3acba278d886482b84d3e4bf722 (patch)
treec57d51fe730dc1c5d641b0fe345275a3c82cb0da /plugingui/checkbox.cc
parent8e5b1e0b171d0e4ff326a3ff1af162805d82a3d6 (diff)
Add new PowerWidget for setting and showing control points of the powermap.
Diffstat (limited to 'plugingui/checkbox.cc')
-rw-r--r--plugingui/checkbox.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc
index 1893f59..f3601bd 100644
--- a/plugingui/checkbox.cc
+++ b/plugingui/checkbox.cc
@@ -32,19 +32,18 @@ namespace GUI
{
CheckBox::CheckBox(Widget* parent)
- : Toggle(parent)
- , bg_on(getImageCache(), ":resources/switch_back_on.png")
- , bg_off(getImageCache(), ":resources/switch_back_off.png")
- , knob(getImageCache(), ":resources/switch_front.png")
+ : Toggle(parent)
+ , bg_on(getImageCache(), ":resources/switch_back_on.png")
+ , bg_off(getImageCache(), ":resources/switch_back_off.png")
+ , knob(getImageCache(), ":resources/switch_front.png")
{
}
void CheckBox::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
-
- p.drawImage(
- 0, (knob.height() - bg_on.height()) / 2, state ? bg_on : bg_off);
+ p.clear();
+ p.drawImage(0, (knob.height() - bg_on.height()) / 2, state ? bg_on : bg_off);
if(clicked)
{