void CompilerSettingsDlg::UpdateListbookImages() { wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook); int sel = lb->GetSelection(); if (SettingsIconsStyle(Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/environment/settings_size"), 0))) { SetSettingsIconsStyle(lb->GetListView(), sisNoIcons); lb->SetImageList(nullptr); } else { lb->SetImageList(m_pImageList); // set page images according to their on/off status for (size_t i = 0; i < IMAGES_COUNT + m_PluginPanels.GetCount(); ++i) lb->SetPageImage(i, (i * 2) + (sel == (int)i ? 0 : 1)); SetSettingsIconsStyle(lb->GetListView(), sisLargeIcons); } // update the page title wxString label = lb->GetPageText(sel); // replace any stray & with && because label makes it an underscore while (label.Replace(_T(" & "), _T(" && "))) ; XRCCTRL(*this, "lblBigTitle", wxStaticText)->SetLabel(label); XRCCTRL(*this, "pnlTitleInfo", wxPanel)->Layout(); }
SettingsIconsStyle GetSettingsIconsStyle() { return SettingsIconsStyle(Manager::Get()->GetConfigManager(_T("app"))->ReadInt(_T("/environment/settings_size"), 0)); }