Merge pull request #84242 from gnidorah/qt

nixos/qt5: support adwaita-dark theme
This commit is contained in:
worldofpeace 2020-04-24 08:47:21 -04:00 committed by GitHub
commit 90e16f7ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,8 +6,8 @@ let
cfg = config.qt5; cfg = config.qt5;
isQGnome = cfg.platformTheme == "gnome" && cfg.style == "adwaita"; isQGnome = cfg.platformTheme == "gnome" && builtins.elem cfg.style ["adwaita" "adwaita-dark"];
isQtStyle = cfg.platformTheme == "gtk2" && cfg.style != "adwaita"; isQtStyle = cfg.platformTheme == "gtk2" && !(builtins.elem cfg.style ["adwaita" "adwaita-dark"]);
packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ] packages = if isQGnome then [ pkgs.qgnomeplatform pkgs.adwaita-qt ]
else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ] else if isQtStyle then [ pkgs.libsForQt5.qtstyleplugins ]
@ -55,6 +55,7 @@ in
style = mkOption { style = mkOption {
type = types.enum [ type = types.enum [
"adwaita" "adwaita"
"adwaita-dark"
"cleanlooks" "cleanlooks"
"gtk2" "gtk2"
"motif" "motif"
@ -71,6 +72,7 @@ in
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term><literal>adwaita</literal></term> <term><literal>adwaita</literal></term>
<term><literal>adwaita-dark</literal></term>
<listitem><para>Use Adwaita Qt style with <listitem><para>Use Adwaita Qt style with
<link xlink:href="https://github.com/FedoraQt/adwaita-qt">adwaita</link> <link xlink:href="https://github.com/FedoraQt/adwaita-qt">adwaita</link>
</para></listitem> </para></listitem>