From 3f2759f9676f43426a413a474fc1a59ce7b75742 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Fri, 20 Sep 2024 09:03:18 -0500 Subject: [PATCH] format changes --- functions/private/Invoke-WinUtilExplorerRefresh.ps1 | 2 +- functions/private/Invoke-WinutilThemeChange.ps1 | 4 ++-- scripts/main.ps1 | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/functions/private/Invoke-WinUtilExplorerRefresh.ps1 b/functions/private/Invoke-WinUtilExplorerRefresh.ps1 index d50fcb22c4..76041169c9 100644 --- a/functions/private/Invoke-WinUtilExplorerRefresh.ps1 +++ b/functions/private/Invoke-WinUtilExplorerRefresh.ps1 @@ -30,4 +30,4 @@ public class Win32 { # Send the broadcast message to all windows [Win32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [IntPtr]::Zero, "ImmersiveColorSet", $SMTO_ABORTIFHUNG, $timeout, [ref]([IntPtr]::Zero)) } -} \ No newline at end of file +} diff --git a/functions/private/Invoke-WinutilThemeChange.ps1 b/functions/private/Invoke-WinutilThemeChange.ps1 index fc1bbe18ed..0bf8f3fd7a 100644 --- a/functions/private/Invoke-WinutilThemeChange.ps1 +++ b/functions/private/Invoke-WinutilThemeChange.ps1 @@ -148,14 +148,14 @@ function Invoke-WinutilThemeChange { switch ($theme) { "Auto" { $systemUsesDarkMode = Get-WinUtilToggleStatus WPFToggleDarkMode - if ($systemUsesDarkMode){ + if ($systemUsesDarkMode) { Set-WinutilTheme -currentTheme "Dark" } else{ Set-WinutilTheme -currentTheme "Light" } - + $themeButtonIcon = [char]0xF08C Remove-Item $LightPreferencePath -Force -ErrorAction SilentlyContinue Remove-Item $DarkPreferencePath -Force -ErrorAction SilentlyContinue diff --git a/scripts/main.ps1 b/scripts/main.ps1 index ed81cd6913..da45b3bef7 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -227,7 +227,7 @@ $sync["Form"].Add_PreViewKeyDown($commonKeyEvents) $sync["Form"].Add_MouseLeftButtonDown({ # Hide Settings and Theme Popup on click anywhere else if ($sync.SettingsButton.IsOpen -or - $sync.ThemePopup.IsOpen){ + $sync.ThemePopup.IsOpen) { $sync.SettingsPopup.IsOpen = $false $sync.ThemePopup.IsOpen = $false } @@ -237,7 +237,7 @@ $sync["Form"].Add_MouseLeftButtonDown({ $sync["Form"].Add_MouseDoubleClick({ if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or $_.OriginalSource -is [System.Windows.Controls.StackPanel]) { - if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal){ + if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal) { $sync["Form"].WindowState = [Windows.WindowState]::Maximized } else{ @@ -250,7 +250,7 @@ $sync["Form"].Add_Deactivated({ Write-Debug "WinUtil lost focus" # Hide Settings and Theme Popup on Winutil Focus Loss if ($sync.SettingsButton.IsOpen -or - $sync.ThemePopup.IsOpen){ + $sync.ThemePopup.IsOpen) { $sync.SettingsPopup.IsOpen = $false $sync.ThemePopup.IsOpen = $false } @@ -467,7 +467,7 @@ $sync["Form"].Add_Activated({ }) # Define event handler for ThemeButton click $sync["ThemeButton"].Add_Click({ - if ($sync.ThemePopup.IsOpen){ + if ($sync.ThemePopup.IsOpen) { $sync.ThemePopup.IsOpen = $false } else{ @@ -499,7 +499,7 @@ $sync["LightThemeMenuItem"].Add_Click({ # Define event handler for button click $sync["SettingsButton"].Add_Click({ Write-Debug "SettingsButton clicked" - if ($sync.Settings.IsOpen){ + if ($sync.Settings.IsOpen) { $sync.Settings.IsOpen = $false } else{