diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-04-25 21:09:22 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-04-25 21:09:22 +0200 |
commit | 4f8d58ba39a58b5a6f67d3b83cabc4add4cca0c6 (patch) | |
tree | 5be8dba730c769a3bf81040145cb3c06f02d0e9f /plugingui/checkbox.cc | |
parent | 8df7a7e494d734ae4c82a229a89e88eaf69288e9 (diff) |
WIP: UI adaptation for plugingui integration.
Diffstat (limited to 'plugingui/checkbox.cc')
-rw-r--r-- | plugingui/checkbox.cc | 13 |
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) { |