From 87d4fd11278625692dc46ba2961b02c2204d3370 Mon Sep 17 00:00:00 2001 From: ulli-lassance Date: Sun, 21 Dec 2025 20:25:13 -0300 Subject: [PATCH] qt: add standardDialogs option (#2090) Link: https://github.com/nix-community/stylix/pull/2090 Co-authored-by: NAHO Reviewed-by: NAHO Reviewed-by: Mikilio (cherry picked from commit 626dab1b562310feca0fa84e2a166c7327440f83) --- modules/qt/hm.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/qt/hm.nix b/modules/qt/hm.nix index b1869f3b..732a9623 100644 --- a/modules/qt/hm.nix +++ b/modules/qt/hm.nix @@ -28,6 +28,28 @@ type = lib.types.str; default = "qtct"; }; + + standardDialogs = lib.mkOption { + description = '' + Selects the standard dialogs theme to be used by Qt. + + Using `xdgdesktopportal` integrates with the native desktop portal. + ''; + + # The enum variants are derived from the qt6ct platform theme integration + # [1]. + # + # [1]: https://www.opencode.net/trialuser/qt6ct/-/blob/00823e41aa60e8fe266d5aee328e82ad1ad94348/src/qt6ct/appearancepage.cpp#L83-L92 + type = lib.types.enum [ + "default" + "gtk2" + "gtk3" + "kde" + "xdgdesktopportal" + ]; + + default = "default"; + }; }; config = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) ( @@ -80,6 +102,7 @@ qtctSettings = { Appearance = { custom_palette = true; + standard_dialogs = config.stylix.targets.qt.standardDialogs; style = lib.mkIf (config.qt.style ? name) config.qt.style.name; icon_theme = lib.mkIf (icons != null) icons; };