lol

nixos/qt5: add qt5ct as a possible platform theme

+12 -1
+12 -1
nixos/modules/config/qt5.nix
··· 8 8 9 9 isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"]; 10 10 isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]); 11 + isQt5ct = cfg.platformTheme == "qt5ct"; 11 12 12 13 packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ] 13 14 else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] 15 + else if isQt5ct then [ pkgs.libsForQt5.qt5ct ] 14 16 else throw "`qt5.platformTheme` ${cfg.platformTheme} and `qt5.style` ${cfg.style} are not compatible."; 15 17 16 18 in ··· 26 28 type = types.enum [ 27 29 "gtk2" 28 30 "gnome" 31 + "qt5ct" 29 32 ]; 30 33 example = "gnome"; 31 34 relatedPackages = [ 32 35 "qgnomeplatform" 33 36 ["libsForQt5" "qtstyleplugins"] 37 + ["libsForQt5" "qt5ct"] 34 38 ]; 35 39 description = '' 36 40 Selects the platform theme to use for Qt5 applications.</para> ··· 46 50 <term><literal>gnome</literal></term> 47 51 <listitem><para>Use GNOME theme with 48 52 <link xlink:href="https://github.com/FedoraQt/QGnomePlatform">qgnomeplatform</link> 53 + </para></listitem> 54 + </varlistentry> 55 + <varlistentry> 56 + <term><literal>qt5ct</literal></term> 57 + <listitem><para>Use Qt style set using the 58 + <link xlink:href="https://sourceforge.net/projects/qt5ct/">qt5ct</link> 59 + application. 49 60 </para></listitem> 50 61 </varlistentry> 51 62 </variablelist> ··· 96 107 97 108 environment.variables.QT_QPA_PLATFORMTHEME = cfg.platformTheme; 98 109 99 - environment.variables.QT_STYLE_OVERRIDE = cfg.style; 110 + environment.variables.QT_STYLE_OVERRIDE = mkIf (! isQt5ct) cfg.style; 100 111 101 112 environment.systemPackages = packages; 102 113