Kaydet (Commit) 5397a8ad authored tarafından Jan Holesovsky's avatar Jan Holesovsky

tdf#90127: Read icon theme from the config when called too early.

Change-Id: I9999150cafde6b103cf1a80232113b7a3d11cfdb
üst 02fe9b00
...@@ -3026,6 +3026,19 @@ StyleSettings::SetIconTheme(const OUString& theme) ...@@ -3026,6 +3026,19 @@ StyleSettings::SetIconTheme(const OUString& theme)
OUString OUString
StyleSettings::DetermineIconTheme() const StyleSettings::DetermineIconTheme() const
{ {
if (mxData->mIconTheme.isEmpty())
{
// read from the configuration, or fallback to what the desktop wants
uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
if (xContext.is())
{
mxData->mIconTheme = officecfg::Office::Common::Misc::SymbolStyle::get(xContext);
if (mxData->mIconTheme.isEmpty() || mxData->mIconTheme == "auto")
mxData->mIconTheme = GetAutomaticallyChosenIconTheme();
}
}
OUString r = mxData->mIconThemeSelector->SelectIconTheme( OUString r = mxData->mIconThemeSelector->SelectIconTheme(
mxData->mIconThemeScanner->GetFoundIconThemes(), mxData->mIconThemeScanner->GetFoundIconThemes(),
mxData->mIconTheme mxData->mIconTheme
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment