From 17a10287d2c306cca1a4f9689af7ada9cb37a39e Mon Sep 17 00:00:00 2001 From: brwith <44518627+brwith@users.noreply.github.com> Date: Sat, 10 Apr 2021 11:15:14 +0930 Subject: [PATCH] gtk: use font.size option in dconf (#1920) Allow usage of font.size for the GTK interface font in dconf. --- modules/misc/gtk.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/misc/gtk.nix b/modules/misc/gtk.nix index f5b1c697..f1f83347 100644 --- a/modules/misc/gtk.nix +++ b/modules/misc/gtk.nix @@ -138,8 +138,12 @@ in { gtk-icon-theme-name = cfg.iconTheme.name; }; - dconfIni = optionalAttrs (cfg.font != null) { font-name = cfg.font.name; } - // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; } + dconfIni = optionalAttrs (cfg.font != null) { + font-name = let + fontSize = + optionalString (cfg.font.size != null) " ${toString cfg.font.size}"; + in "${cfg.font.name}" + fontSize; + } // optionalAttrs (cfg.theme != null) { gtk-theme = cfg.theme.name; } // optionalAttrs (cfg.iconTheme != null) { icon-theme = cfg.iconTheme.name; };