// Populate the list with available color schemes for (autoconst& rName : m_pColorConfig->GetColorSchemeNames())
{ // Default schemes (preinstalled with LO) have TranslateIds if (m_pColorConfig->IsDefaultScheme(rName))
{
m_xSchemeList->append(rName, IDEResId(m_pColorConfig->GetSchemeTranslateId(rName)));
} else
{
m_xSchemeList->append(rName, rName);
}
}
m_xSchemeList->make_sorted();
// Set initial selection in the dialog
m_xUseAppCollors->set_active(true); if (m_sSelectedSchemeId == DEFAULT_SCHEME)
{ // The "Application Colors" theme is being used
m_xSchemeList->set_sensitive(false);
} else
{ // Check if the scheme exists if (comphelper::findValue(m_pColorConfig->GetColorSchemeNames(), m_sSelectedSchemeId) != -1)
{
m_xUseScheme->set_active(true);
m_xSchemeList->select_id(m_sSelectedSchemeId);
} else
{
m_xSchemeList->set_sensitive(false);
}
}
}
if (m_xUseScheme->get_active())
{
m_xSchemeList->set_sensitive(true); // Always select a item to avoid having nothing selected if (m_sSelectedSchemeId == DEFAULT_SCHEME)
{ // If the default color scheme was selected, then choose first entry in the list
m_xSchemeList->select_id(m_xSchemeList->get_id(0));
m_pModulWinLayout->ApplyColorSchemeToCurrentWindow(m_xSchemeList->get_id(0));
} else
{ // If a color scheme was active, select it in the list
m_xSchemeList->select_id(m_sSelectedSchemeId);
m_pModulWinLayout->ApplyColorSchemeToCurrentWindow(m_sSelectedSchemeId);
}
}
}
IMPL_LINK_NOARG(ColorSchemeDialog, SelectHdl, weld::TreeView&, void)
{ // Apply the selected scheme only for the current ModulWinLayout for preview // Only if the user presses OK the scheme will be applied to all ModulWinLayout(s)
m_sSelectedSchemeId = m_xSchemeList->get_selected_id();
m_pModulWinLayout->ApplyColorSchemeToCurrentWindow(m_sSelectedSchemeId);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.