forked from quickshell/quickshell
core/icon: allow changing the icon theme
This commit is contained in:
parent
7a283089b1
commit
bd8978375b
2 changed files with 13 additions and 0 deletions
|
|
@ -822,6 +822,7 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
|||
bool useQApplication = false;
|
||||
bool nativeTextRendering = false;
|
||||
bool desktopSettingsAware = true;
|
||||
QString iconTheme = qEnvironmentVariable("QS_ICON_THEME");
|
||||
QHash<QString, QString> envOverrides;
|
||||
} pragmas;
|
||||
|
||||
|
|
@ -834,6 +835,7 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
|||
if (pragma == "UseQApplication") pragmas.useQApplication = true;
|
||||
else if (pragma == "NativeTextRendering") pragmas.nativeTextRendering = true;
|
||||
else if (pragma == "IgnoreSystemSettings") pragmas.desktopSettingsAware = false;
|
||||
else if (pragma.startsWith("IconTheme ")) pragmas.iconTheme = pragma.sliced(10);
|
||||
else if (pragma.startsWith("Env ")) {
|
||||
auto envPragma = pragma.sliced(4);
|
||||
auto splitIdx = envPragma.indexOf('=');
|
||||
|
|
@ -857,6 +859,10 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
|||
|
||||
file.close();
|
||||
|
||||
if (!pragmas.iconTheme.isEmpty()) {
|
||||
QIcon::setThemeName(pragmas.iconTheme);
|
||||
}
|
||||
|
||||
qInfo() << "Shell ID:" << shellId << "Path ID" << pathId;
|
||||
|
||||
auto launchTime = qs::Common::LAUNCH_TIME.toSecsSinceEpoch();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue