MCPcopy Create free account
hub / github.com/ZL-Audio/ZLEqualizer / CompactButton

Method CompactButton

source/gui/button/compact_button/compact_button.cpp:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12namespace 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);

Callers

nothing calls this directly

Calls 1

buttonDownAnimationMethod · 0.95

Tested by

no test coverage detected