summaryrefslogtreecommitdiff
path: root/plugingui/powerbutton.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-01 19:01:25 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-01 19:01:25 +0200
commit1f41de14a04240dfd993b030306ac251d962a843 (patch)
tree08d5ef8b74793909a15cb8f3c0b7732819a41f8a /plugingui/powerbutton.cc
parent4739f0bed6e6332fcf2c6ed2b04c4ae161c41060 (diff)
Fix a lot of style issues in the code for the new GUI.
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);
}
}