mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 01:51:18 +10:00
Reapply font scaling after theme change (#4782)
This commit is contained in:
@@ -74,6 +74,9 @@ function Invoke-WinUtilFontScaling {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Store the scale factor so it can be reapplied after theme changes
|
||||||
|
$sync.FontScaleFactor = $ScaleFactor
|
||||||
|
|
||||||
# Update the font scaling percentage displayed on the UI
|
# Update the font scaling percentage displayed on the UI
|
||||||
if ($sync.FontScalingValue) {
|
if ($sync.FontScalingValue) {
|
||||||
$percentage = [math]::Round($ScaleFactor * 100)
|
$percentage = [math]::Round($ScaleFactor * 100)
|
||||||
|
|||||||
@@ -149,6 +149,11 @@ function Invoke-WinutilThemeChange {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Reapply font scaling if it was previously set (theme change resets shared resources)
|
||||||
|
if ($sync.ContainsKey("FontScaleFactor") -and $sync.FontScaleFactor -ne 1.0) {
|
||||||
|
Invoke-WinUtilFontScaling -ScaleFactor $sync.FontScaleFactor
|
||||||
|
}
|
||||||
|
|
||||||
# Update the theme selector button with the appropriate icon
|
# Update the theme selector button with the appropriate icon
|
||||||
$ThemeButton = $sync.Form.FindName("ThemeButton")
|
$ThemeButton = $sync.Form.FindName("ThemeButton")
|
||||||
$ThemeButton.Content = [string]$themeButtonIcon
|
$ThemeButton.Content = [string]$themeButtonIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user