diff options
author | José Romildo <malaquias@gmail.com> | 2022-07-05 10:32:11 -0300 |
---|---|---|
committer | José Romildo <malaquias@gmail.com> | 2022-07-05 11:15:19 -0300 |
commit | a264a86d935fae69558f363881d65a19a4f4d735 (patch) | |
tree | 0b321cc0c2d555c22c533dc8fade398e3b1c0564 | |
parent | 24b6540f33ec285ab9de07d3e3cdb3c0965e1c47 (diff) |
nixos/qt5: add qt5ct as a possible platform theme
-rw-r--r-- | nixos/modules/config/qt5.nix | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/config/qt5.nix b/nixos/modules/config/qt5.nix index eabba9ad95f00..f0ea6825db105 100644 --- a/nixos/modules/config/qt5.nix +++ b/nixos/modules/config/qt5.nix @@ -8,9 +8,11 @@ let isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"]; isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]); + isQt5ct = cfg.platformTheme == "qt5ct"; packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ] else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] + else if isQt5ct then [ pkgs.libsForQt5.qt5ct ] else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible."; in @@ -26,11 +28,13 @@ in type = types.enum [ "gtk2" "gnome" + "qt5ct" ]; example = "gnome"; relatedPackages = [ "qgnomeplatform" ["libsForQt5" "qtstyleplugins"] + ["libsForQt5" "qt5ct"] ]; description = '' Selects the platform theme to use for Qt5 applications.</para> @@ -48,6 +52,13 @@ in <link xlink:href="https://github.com/FedoraQt/QGnomePlatform">qgnomeplatform</link> </para></listitem> </varlistentry> + <varlistentry> + <term><literal>qt5ct</literal></term> + <listitem><para>Use Qt style set using the + <link xlink:href="https://sourceforge.net/projects/qt5ct/">qt5ct</link> + application. + </para></listitem> + </varlistentry> </variablelist> ''; }; @@ -96,7 +107,7 @@ in environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme; - environment.variables.QT_STYLE_OVERRIDE = cfg.style; + environment.variables.QT_STYLE_OVERRIDE = mkIf (! isQt5ct) cfg.style; environment.systemPackages = packages; |