From b97b1755ef39c32289d96d9b8659ff4a28e758d2 Mon Sep 17 00:00:00 2001 From: musjj <72612857+musjj@users.noreply.github.com> Date: Sun, 22 Dec 2024 06:04:56 +0700 Subject: [PATCH] vscode: don't round font sizes (#691) Link: https://github.com/danth/stylix/pull/691 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> (cherry picked from commit 4f489c63932f014be856475154bf342f8a40f5ff) --- modules/vscode/hm.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/vscode/hm.nix b/modules/vscode/hm.nix index e738b3c7d..590a4548c 100644 --- a/modules/vscode/hm.nix +++ b/modules/vscode/hm.nix @@ -36,18 +36,18 @@ in { "chat.editor.fontFamily" = monospace.name; # 4/3 factor used for pt to px; - "editor.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5); - "debug.console.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5); - "markdown.preview.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5); - "terminal.integrated.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5); - "chat.editor.fontSize" = builtins.floor (sizes.terminal * 4 / 3 + 0.5); + "editor.fontSize" = sizes.terminal * 4.0 / 3.0; + "debug.console.fontSize" = sizes.terminal * 4.0 / 3.0; + "markdown.preview.fontSize" = sizes.terminal * 4.0 / 3.0; + "terminal.integrated.fontSize" = sizes.terminal * 4.0 / 3.0; + "chat.editor.fontSize" = sizes.terminal * 4.0 / 3.0; # other factors (9/14, 13/14, 56/14) based on default for given value # divided by default for `editor.fontSize` (14) from # https://code.visualstudio.com/docs/getstarted/settings#_default-settings. - "editor.minimap.sectionHeaderFontSize" = builtins.floor (sizes.terminal * 4 / 3 * 9 / 14 + 0.5); - "scm.inputFontSize" = builtins.floor (sizes.terminal * 4 / 3 * 13 / 14 + 0.5); - "screencastMode.fontSize" = builtins.floor (sizes.terminal * 4 / 3 * 56 / 14 + 0.5); + "editor.minimap.sectionHeaderFontSize" = sizes.terminal * 4.0 / 3.0 * 9.0 / 14.0; + "scm.inputFontSize" = sizes.terminal * 4.0 / 3.0 * 13.0 / 14.0; + "screencastMode.fontSize" = sizes.terminal * 4.0 / 3.0 * 56.0 / 14.0; }; }; };