MCPcopy Create free account
hub / github.com/audacity/audacity / MakeButton

Method MakeButton

modules/sharing/mod-cloud-audiocom/ui/ShareAudioToolbar.cpp:167–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167AButton* ShareAudioToolbar::MakeButton(int id, const TranslatableString& label, const wxImage& icon)
168{
169#if ADD_MUSEHUB_BUTTON
170 const auto height = 25;
171#else
172 const auto height = (toolbarSingle - toolbarMargin) * 2;
173#endif
174
175 auto button = safenew AButton(this, id);
176 button->SetLabel(label);
177 button->SetButtonType(AButton::FrameTextHButton);
178 button->SetImages(
179 theTheme.Image(bmpRecoloredUpSmall),
180 theTheme.Image(bmpRecoloredUpHiliteSmall),
181 theTheme.Image(bmpRecoloredDownSmall),
182 theTheme.Image(bmpRecoloredHiliteSmall),
183 theTheme.Image(bmpRecoloredUpSmall));
184 button->SetIcon(icon);
185 button->SetForegroundColour(theTheme.Colour(clrTrackPanelText));
186
187 button->SetMinSize(wxSize{-1, height});
188 button->SetMaxSize(wxSize{-1, height});
189 button->SetFrameMid(3);
190
191 return button;
192}
193
194
195void ShareAudioToolbar::MakeShareAudioButton()

Callers

nothing calls this directly

Calls 6

SetButtonTypeMethod · 0.80
SetImagesMethod · 0.80
SetIconMethod · 0.80
SetFrameMidMethod · 0.80
AButtonClass · 0.50
SetLabelMethod · 0.45

Tested by

no test coverage detected