diff --git a/shell/main.cpp b/shell/main.cpp index c1155b6cc..1875fe716 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -129,12 +129,15 @@ int main(int argc, char *argv[]) } if (cliOptions.isSet(standaloneOption)) { - ShellManager::s_standaloneOption += " -a"; + ShellManager::s_restartOptions += " -a"; } if (cliOptions.isSet(standaloneOption) && cliOptions.isSet(shellPluginOption)) { + ShellManager::s_standaloneOption = true; app.setApplicationName("plasmashell_"+cliOptions.value(shellPluginOption)); + Plasma::Theme theme; + theme.setUseGlobalSettings(false); KDBusService service(KDBusService::Unique); ShellCorona *corona = new ShellCorona; corona->setShell(cliOptions.value(shellPluginOption)); diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp index 2f232e522..6175eecdd 100644 --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -123,26 +123,28 @@ ShellCorona::ShellCorona(QObject *parent) saveLayout(); }); - const QString themeGroupKey = QStringLiteral("Theme"); - const QString themeNameKey = QStringLiteral("name"); - - QString themeName; - - KConfigGroup plasmarc(KSharedConfig::openConfig("plasmarc"), themeGroupKey); - themeName = plasmarc.readEntry(themeNameKey, themeName); - - if (themeName.isEmpty()) { - KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig( - m_lookAndFeelPackage.filePath("defaults")), - "plasmarc" - ); - lnfCfg = KConfigGroup(&lnfCfg, themeGroupKey); - themeName = lnfCfg.readEntry(themeNameKey, themeName); - } + if (!ShellManager::s_standaloneOption) { + const QString themeGroupKey = QStringLiteral("Theme"); + const QString themeNameKey = QStringLiteral("name"); + + QString themeName; + + KConfigGroup plasmarc(KSharedConfig::openConfig("plasmarc"), themeGroupKey); + themeName = plasmarc.readEntry(themeNameKey, themeName); + + if (themeName.isEmpty()) { + KConfigGroup lnfCfg = KConfigGroup(KSharedConfig::openConfig( + m_lookAndFeelPackage.filePath("defaults")), + "plasmarc" + ); + lnfCfg = KConfigGroup(&lnfCfg, themeGroupKey); + themeName = lnfCfg.readEntry(themeNameKey, themeName); + } - if (!themeName.isEmpty()) { - Plasma::Theme *t = new Plasma::Theme(this); - t->setThemeName(themeName); + if (!themeName.isEmpty()) { + Plasma::Theme *t = new Plasma::Theme(this); + t->setThemeName(themeName); + } } connect(this, &ShellCorona::containmentAdded,