From b08f2dc51eab76780a9e38a7e82ec322d86e8d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 22 Apr 2017 15:22:22 +0200 Subject: Fix inverted humanizer frame button. --- plugingui/frame.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } -- cgit v1.2.3