Skip to content

Commit

Permalink
format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTitusTech committed Sep 20, 2024
1 parent 1ee7274 commit 3f2759f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion functions/private/Invoke-WinUtilExplorerRefresh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
4 changes: 2 additions & 2 deletions functions/private/Invoke-WinutilThemeChange.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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{
Expand All @@ -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
}
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 3f2759f

Please sign in to comment.