diff options
author | André Nusser <andre.nusser@googlemail.com> | 2018-06-08 01:18:02 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2018-06-08 01:19:19 +0200 |
commit | 8f3f22bb5d9d6879bb21d0132a3e0d0af4cd5380 (patch) | |
tree | b3aab48cde087b07d0152b5b6945c3eea305a6ad /plugingui/frame.h | |
parent | f532587d5c3576dc04d4c6eeee20c5dcdf642244 (diff) |
Disable bleed control frame if drumkit doesn't support it.
Diffstat (limited to 'plugingui/frame.h')
-rw-r--r-- | plugingui/frame.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugingui/frame.h b/plugingui/frame.h index eb745f6..e29bd3d 100644 --- a/plugingui/frame.h +++ b/plugingui/frame.h @@ -52,8 +52,10 @@ public: void setContent(Widget* content); void setOnSwitch(bool on); + void setEnabled(bool enabled); Notifier<bool> onSwitchChangeNotifier; // (bool on) + Notifier<bool> onEnabledChanged; // (bool enabled) protected: // From Widget: @@ -62,6 +64,8 @@ protected: //! Callback for Widget::sizeChangeNotifier void sizeChanged(int width, int height); + bool enabled = true; + private: // // upper bar @@ -71,6 +75,7 @@ private: Font font; std::string title; GUI::Colour label_colour{0.1}; + GUI::Colour label_colour_disabled{0.5}; std::size_t label_width; // switch @@ -82,6 +87,7 @@ private: // grey box int bar_height; GUI::Colour grey_box_colour{0.7}; + GUI::Colour grey_box_colour_disabled{0.7}; GUI::Colour background_colour{0.85, 0.8}; // |