| 11 | |
| 12 | namespace zlgui::button { |
| 13 | CompactButton::CompactButton(const juce::String& labelText, UIBase& base, const juce::String& tooltip_text) |
| 14 | : base_(base), laf_(base_) { |
| 15 | button_.setToggleable(true); |
| 16 | button_.setClickingTogglesState(true); |
| 17 | button_.setButtonText(labelText); |
| 18 | button_.setLookAndFeel(&laf_); |
| 19 | button_.onClick = [this]() { this->buttonDownAnimation(); }; |
| 20 | addAndMakeVisible(button_); |
| 21 | |
| 22 | setEditable(true); |
| 23 | if (tooltip_text.length() > 0) { |
| 24 | button_.setTooltip(tooltip_text); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | CompactButton::~CompactButton() { |
| 29 | button_.setLookAndFeel(nullptr); |
nothing calls this directly
no test coverage detected