diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 28bf9525..0a0c566b 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -255,10 +255,14 @@ $sync["Form"].Add_MouseLeftButtonDown({ }) $sync["Form"].Add_MouseDoubleClick({ - if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal) { - $sync["Form"].WindowState = [Windows.WindowState]::Maximized; - } else { - $sync["Form"].WindowState = [Windows.WindowState]::Normal; + if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or + $_.OriginalSource -is [System.Windows.Controls.StackPanel]) { + if ($sync["Form"].WindowState -eq [Windows.WindowState]::Normal){ + $sync["Form"].WindowState = [Windows.WindowState]::Maximized + } + else{ + $sync["Form"].WindowState = [Windows.WindowState]::Normal + } } })