diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-17 16:33:45 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-17 16:33:58 +0200 |
commit | cbb0f0f34e71630cb59ac4a831daf445f58a6427 (patch) | |
tree | 1114dd2b50aa4a63832e595bec445170f6ba12fb /plugingui/frame.cc | |
parent | febd5dec458e9fb066dab218b07d6c42b53ea5b1 (diff) |
Connect humanizer controls to settings.
Diffstat (limited to 'plugingui/frame.cc')
-rw-r--r-- | plugingui/frame.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugingui/frame.cc b/plugingui/frame.cc index d0e7dff..ed4a67b 100644 --- a/plugingui/frame.cc +++ b/plugingui/frame.cc @@ -32,7 +32,9 @@ namespace GUI { FrameWidget::FrameWidget(Widget* parent, bool has_switch) - : Widget(parent), is_switched_on(!has_switch), bar_height(24) + : Widget(parent) + , is_switched_on(!has_switch) + , bar_height(24) { if(has_switch) { @@ -82,6 +84,8 @@ void FrameWidget::powerButtonClicked(bool clicked) { is_switched_on = !is_switched_on; + onSwitchChangeNotifier(is_switched_on); + if(content) { content->setVisible(true); @@ -101,6 +105,13 @@ void FrameWidget::setContent(Widget* content) content->setVisible(true); } +void FrameWidget::setOnSwitch(bool on) +{ + is_switched_on = on; + onSwitchChangeNotifier(is_switched_on); + redraw(); +} + void FrameWidget::sizeChanged(int width, int height) { if(content) |