From 3bd60031717a8efa50edcca01f9748cc7e0a82ce Mon Sep 17 00:00:00 2001 From: spooky Date: Tue, 5 Aug 2025 20:57:12 +0530 Subject: [PATCH] Fix scaling of UI Elements when applying Font Scaling (#3526) * Add scaling for UI elements * Fix text in Updates tab not scaling * Fix tab row scaling error * Add comments for modularity --- config/themes.json | 1 + .../private/Invoke-WinUtilFontScaling.ps1 | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/config/themes.json b/config/themes.json index 39bb74a7..4775ee5a 100644 --- a/config/themes.json +++ b/config/themes.json @@ -32,6 +32,7 @@ "ButtonFontFamily": "Arial", "ButtonWidth": "200", "ButtonHeight": "25", + "ConfigTabButtonFontSize": "14", "ConfigUpdateButtonFontSize": "14", "SearchBarWidth": "200", "SearchBarHeight": "26", diff --git a/functions/private/Invoke-WinUtilFontScaling.ps1 b/functions/private/Invoke-WinUtilFontScaling.ps1 index 16a9bbd3..f30e52bd 100644 --- a/functions/private/Invoke-WinUtilFontScaling.ps1 +++ b/functions/private/Invoke-WinUtilFontScaling.ps1 @@ -25,10 +25,12 @@ function Invoke-WinUtilFontScaling { # Define an array for resources to be scaled $fontResources = @( + # Fonts "FontSize", "ButtonFontSize", "HeaderFontSize", "TabButtonFontSize", + "ConfigTabButtonFontSize", "IconFontSize", "SettingsIconFontSize", "CloseIconFontSize", @@ -38,7 +40,21 @@ function Invoke-WinUtilFontScaling { "CustomDialogFontSize", "CustomDialogFontSizeHeader", "ConfigUpdateButtonFontSize", - "CheckBoxBulletDecoratorSize" + # Buttons and UI + "CheckBoxBulletDecoratorSize", + "ButtonWidth", + "ButtonHeight", + "TabButtonWidth", + "TabButtonHeight", + "IconButtonSize", + "AppEntryWidth", + "SearchBarWidth", + "SearchBarHeight", + "CustomDialogWidth", + "CustomDialogHeight", + "CustomDialogLogoSize", + "MicroWinLogoSize", + "ToolTipWidth" ) # Apply scaling to each resource