summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-05-25 11:39:42 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-25 11:47:15 +0200
commit55c6bd93e9c02b2160b82c0d489d05ba31a0f13c (patch)
tree9fbc32966277028c7fad1ced5a275b59e28a0c0c
parent4163bde70568d6d5dd7144293484f797e8df9e63 (diff)
tdf#90127: Read icon theme from the config when called too early.
Change-Id: I9999150cafde6b103cf1a80232113b7a3d11cfdb
-rw-r--r--vcl/source/app/settings.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 15eca7d66dc0..5e67ba9c8204 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -3028,6 +3028,19 @@ StyleSettings::SetIconTheme(const OUString& theme)
OUString
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(
mxData->mIconThemeScanner->GetFoundIconThemes(),
mxData->mIconTheme