summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-22 15:22:22 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-22 15:22:22 +0200
commitb08f2dc51eab76780a9e38a7e82ec322d86e8d19 (patch)
treeac36f197f19fbd98cefb39003c47048b4c129fb1
parent6dba77384d627fc817ea04afb3083b94c26b9b06 (diff)
Fix inverted humanizer frame button.
-rw-r--r--plugingui/frame.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugingui/frame.cc b/plugingui/frame.cc
index 9a2928c..c56245a 100644
--- a/plugingui/frame.cc
+++ b/plugingui/frame.cc
@@ -42,6 +42,7 @@ FrameWidget::FrameWidget(Widget* parent, bool has_switch)
power_button.move(4, 4);
power_button.resize(16, 16);
+ power_button.setChecked(is_switched_on);
CONNECT(&power_button, stateChangedNotifier, this,
&FrameWidget::powerButtonClicked);
}
@@ -82,7 +83,6 @@ void FrameWidget::repaintEvent(RepaintEvent* repaintEvent)
void FrameWidget::powerButtonClicked(bool clicked)
{
is_switched_on = !is_switched_on;
-
onSwitchChangeNotifier(is_switched_on);
if(content)
@@ -108,6 +108,7 @@ void FrameWidget::setOnSwitch(bool on)
{
is_switched_on = on;
onSwitchChangeNotifier(is_switched_on);
+
redraw();
}