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

Method AddLoadingErrorPage

modules/sharing/mod-musehub-ui/GetEffectsDialog.cpp:236–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void GetEffectsDialog::AddLoadingErrorPage() {
237 wxPanel* page = safenew wxPanel();
238 page->Hide();
239 page->Create(m_treebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
240
241 wxBoxSizer* sizer = safenew wxBoxSizer(wxVERTICAL);
242
243 page->SetSizer(sizer);
244 sizer->AddSpacer(20);
245
246 wxStaticText* title = safenew wxStaticText(page, wxID_ANY, connectionErrorTitleText.Translation());
247 wxFont font = title->GetFont().MakeLarger().MakeBold();
248 title->SetFont(font);
249
250 wxStaticText* description = safenew wxStaticText(page, wxID_ANY, connectionErrorDescriptionText.Translation());
251 description->Wrap(550);
252
253 GradientButton* button = safenew GradientButton(page, wxID_ANY, tryAgainText.Translation(), wxDefaultPosition, wxSize(getEffectButtonWidth, getEffectButtonHeight));
254 button->SetNormalColor(musehubButtonNormal);
255 button->SetPressedColor(musehubButtonPressed);
256 button->Bind(wxEVT_BUTTON, [this](auto) {
257 ReloadEffectList();
258 });
259
260 sizer->Add(title, 0, wxALL, 10);
261 sizer->Add(description, 0, wxALL, 10);
262 sizer->Add(button, 0, wxALL, 10);
263
264 m_treebook->AddPage(page, loadingPluginsTabText.Translation());
265}
266
267// Wraps the label to the given width and, if it exceeds two lines,
268// collapses the overflow into a single right-elided second line.

Callers

nothing calls this directly

Calls 15

GradientButtonClass · 0.85
AddSpacerMethod · 0.80
TranslationMethod · 0.80
SetFontMethod · 0.80
WrapMethod · 0.80
SetNormalColorMethod · 0.80
SetPressedColorMethod · 0.80
BindMethod · 0.80
wxPanelClass · 0.50
wxBoxSizerClass · 0.50
wxStaticTextClass · 0.50
wxSizeClass · 0.50

Tested by

no test coverage detected