1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-14 15:19:45 +01:00

qt: allow usage without setting platformTheme

This commit is contained in:
Thiago Kenji Okada 2023-10-22 19:13:20 +01:00 committed by Mikilio
parent 93883c4bd9
commit 21e926695f
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -173,7 +173,7 @@ in {
+ (makeQtPath "qtQmlPrefix"); + (makeQtPath "qtQmlPrefix");
}; };
in lib.mkIf (cfg.enable && cfg.platformTheme != null) { in lib.mkIf cfg.enable {
assertions = [{ assertions = [{
assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null assertion = cfg.platformTheme == "gnome" -> cfg.style.name != null
&& cfg.style.package != null; && cfg.style.package != null;
@ -206,8 +206,8 @@ in {
++ lib.optionals (cfg.style.package != null) ++ lib.optionals (cfg.style.package != null)
(lib.toList cfg.style.package); (lib.toList cfg.style.package);
xsession.importedVariables = xsession.importedVariables = [ "QT_PLUGIN_PATH" "QML2_IMPORT_PATH" ]
[ "QT_QPA_PLATFORMTHEME" "QT_PLUGIN_PATH" "QML2_IMPORT_PATH" ] ++ lib.optionals (cfg.platformTheme != null) [ "QT_QPA_PLATFORMTHEME" ]
++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ];
}; };
} }