mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
core: add QS_DROP_EXPENSIVE_FONTS env var
This commit is contained in:
2 files changed
+12
-10
No files matched your search
+11
-9
@@ -169,6 +169,17 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
||||
|
||||
Common::INITIAL_ENVIRONMENT = QProcessEnvironment::systemEnvironment();
|
||||
|
||||
if (!pragmas.useSystemStyle) {
|
||||
qunsetenv("QT_STYLE_OVERRIDE");
|
||||
qputenv("QT_QUICK_CONTROLS_STYLE", "Fusion");
|
||||
}
|
||||
|
||||
for (auto [var, val]: pragmas.envOverrides.asKeyValueRange()) {
|
||||
qputenv(var.toUtf8(), val.toUtf8());
|
||||
}
|
||||
|
||||
pragmas.dropExpensiveFonts |= qEnvironmentVariableIntValue("QS_DROP_EXPENSIVE_FONTS") == 1;
|
||||
|
||||
if (pragmas.dropExpensiveFonts) {
|
||||
if (auto* runDir = QsPaths::instance()->instanceRunDir()) {
|
||||
auto baseConfigPath = qEnvironmentVariable("FONTCONFIG_FILE");
|
||||
@@ -209,15 +220,6 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
|
||||
}
|
||||
}
|
||||
|
||||
if (!pragmas.useSystemStyle) {
|
||||
qunsetenv("QT_STYLE_OVERRIDE");
|
||||
qputenv("QT_QUICK_CONTROLS_STYLE", "Fusion");
|
||||
}
|
||||
|
||||
for (auto [var, val]: pragmas.envOverrides.asKeyValueRange()) {
|
||||
qputenv(var.toUtf8(), val.toUtf8());
|
||||
}
|
||||
|
||||
// The qml engine currently refuses to cache non file (qsintercept) paths.
|
||||
|
||||
// if (auto* cacheDir = QsPaths::instance()->cacheDir()) {
|
||||
|
||||
Reference in new issue
Block a user