Actively follow windows theme (#2781)

This commit is contained in:
Martin Wiethan
2024-09-21 17:01:02 +02:00
committed by GitHub
parent 395ac9495d
commit 42febae25e
2 changed files with 33 additions and 0 deletions

View File

@ -22,6 +22,10 @@ Function Invoke-WinUtilDarkMode {
Set-ItemProperty -Path $Path -Name AppsUseLightTheme -Value $DarkMoveValue
Set-ItemProperty -Path $Path -Name SystemUsesLightTheme -Value $DarkMoveValue
Invoke-WinUtilExplorerRefresh
# Update Winutil Theme if the Theme Button shows the Icon for Auto
if ($sync.ThemeButton.Content -eq [char]0xF08C) {
Invoke-WinutilThemeChange -theme "Auto"
}
} catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
} catch [System.Management.Automation.ItemNotFoundException] {