qt: add "kde6" to qt.platformTheme Related issue: #260696 - Adds KDE Plasma 6 support, which fixes various issues with setting the QT platform theme on the desktop environment

NovaViper 841c9ff6 40ce21b7

Changed files
+27 -4
nixos
modules
config
+27 -4
nixos/modules/config/qt.nix
···
pkgs,
...
}:
-
let
cfg = config.qt;
···
libsForQt5.plasma-integration
libsForQt5.systemsettings
];
+
kde6 = [
+
kdePackages.kio
+
kdePackages.plasma-integration
+
kdePackages.systemsettings
+
];
lxqt = [
lxqt.lxqt-qtplugin
lxqt.lxqt-config
···
];
};
+
# Maps style names to their QT_QPA_PLATFORMTHEME, if necessary.
+
styleNames = {
+
kde6 = "kde";
+
};
+
stylePackages = with pkgs; {
bb10bright = [ libsForQt5.qtstyleplugins ];
bb10dark = [ libsForQt5.qtstyleplugins ];
···
adwaita-qt6
];
-
breeze = [ libsForQt5.breeze-qt5 ];
+
breeze = [
+
libsForQt5.breeze-qt5
+
kdePackages.breeze
+
];
kvantum = [
libsForQt5.qtstyleplugin-kvantum
···
"systemsettings"
]
[
+
"kdePackages"
+
"plasma-integration"
+
]
+
[
+
"kdePackages"
+
"systemsettings"
+
]
+
[
"lxqt"
"lxqt-config"
]
···
The options are
- `gnome`: Use GNOME theme with [qgnomeplatform](https://github.com/FedoraQt/QGnomePlatform)
- `gtk2`: Use GTK theme with [qtstyleplugins](https://github.com/qt/qtstyleplugins)
-
- `kde`: Use Qt settings from Plasma.
+
- `kde`: Use Qt settings from Plasma 5.
+
- `kde6`: Use Qt settings from Plasma 6.
- `lxqt`: Use LXQt style set using the [lxqt-config-appearance](https://github.com/lxqt/lxqt-config)
application.
- `qt5ct`: Use Qt style set using the [qt5ct](https://sourceforge.net/projects/qt5ct/)
···
];
environment.variables = {
-
QT_QPA_PLATFORMTHEME = lib.mkIf (cfg.platformTheme != null) cfg.platformTheme;
+
QT_QPA_PLATFORMTHEME =
+
lib.mkIf (cfg.platformTheme != null)
+
styleNames.${cfg.platformTheme} or cfg.platformTheme;
QT_STYLE_OVERRIDE = lib.mkIf (cfg.style != null) cfg.style;
};