summaryrefslogtreecommitdiff
path: root/plugingui/powerbutton.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugingui/powerbutton.cc')
-rw-r--r--plugingui/powerbutton.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/plugingui/powerbutton.cc b/plugingui/powerbutton.cc
index aee7bd6..85ef0a3 100644
--- a/plugingui/powerbutton.cc
+++ b/plugingui/powerbutton.cc
@@ -31,8 +31,7 @@
namespace GUI
{
-PowerButton::PowerButton(Widget* parent)
- : Toggle(parent)
+PowerButton::PowerButton(Widget* parent) : Toggle(parent)
{
}
@@ -41,19 +40,25 @@ void PowerButton::repaintEvent(RepaintEvent* repaintEvent)
Painter p(*this);
p.clear();
- if (state) {
- if (clicked) {
+ if(state)
+ {
+ if(clicked)
+ {
p.drawImage(0, 0, on_clicked);
}
- else {
+ else
+ {
p.drawImage(0, 0, on);
}
}
- else {
- if (clicked) {
+ else
+ {
+ if(clicked)
+ {
p.drawImage(0, 0, off_clicked);
}
- else {
+ else
+ {
p.drawImage(0, 0, off);
}
}