stylix: set defaultText in font size options
This commit is contained in:
parent
ab2f48fc3a
commit
84f02caad3
1 changed files with 8 additions and 3 deletions
|
|
@ -58,7 +58,12 @@ in
|
|||
mkFontSizeOption =
|
||||
{ default, target }:
|
||||
lib.mkOption {
|
||||
inherit default;
|
||||
default = if builtins.isInt default then default else cfg.sizes.${default};
|
||||
defaultText =
|
||||
if builtins.isInt default then
|
||||
default
|
||||
else
|
||||
lib.literalExpression "config.stylix.fonts.sizes.${default}";
|
||||
|
||||
description = ''
|
||||
The font size used for ${target}.
|
||||
|
|
@ -94,12 +99,12 @@ in
|
|||
|
||||
terminal = mkFontSizeOption {
|
||||
target = "terminals and text editors";
|
||||
default = cfg.sizes.applications;
|
||||
default = "applications";
|
||||
};
|
||||
|
||||
popups = mkFontSizeOption {
|
||||
target = "notifications, popups, and other overlay elements of the desktop";
|
||||
default = cfg.sizes.desktop;
|
||||
default = "desktop";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue