mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
format changes
This commit is contained in:
parent
1ee7274bdb
commit
3f2759f967
@ -30,4 +30,4 @@ public class Win32 {
|
|||||||
# Send the broadcast message to all windows
|
# Send the broadcast message to all windows
|
||||||
[Win32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [IntPtr]::Zero, "ImmersiveColorSet", $SMTO_ABORTIFHUNG, $timeout, [ref]([IntPtr]::Zero))
|
[Win32]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE, [IntPtr]::Zero, "ImmersiveColorSet", $SMTO_ABORTIFHUNG, $timeout, [ref]([IntPtr]::Zero))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,14 +148,14 @@ function Invoke-WinutilThemeChange {
|
|||||||
switch ($theme) {
|
switch ($theme) {
|
||||||
"Auto" {
|
"Auto" {
|
||||||
$systemUsesDarkMode = Get-WinUtilToggleStatus WPFToggleDarkMode
|
$systemUsesDarkMode = Get-WinUtilToggleStatus WPFToggleDarkMode
|
||||||
if ($systemUsesDarkMode){
|
if ($systemUsesDarkMode) {
|
||||||
Set-WinutilTheme -currentTheme "Dark"
|
Set-WinutilTheme -currentTheme "Dark"
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
Set-WinutilTheme -currentTheme "Light"
|
Set-WinutilTheme -currentTheme "Light"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$themeButtonIcon = [char]0xF08C
|
$themeButtonIcon = [char]0xF08C
|
||||||
Remove-Item $LightPreferencePath -Force -ErrorAction SilentlyContinue
|
Remove-Item $LightPreferencePath -Force -ErrorAction SilentlyContinue
|
||||||
Remove-Item $DarkPreferencePath -Force -ErrorAction SilentlyContinue
|
Remove-Item $DarkPreferencePath -Force -ErrorAction SilentlyContinue
|
||||||
|
@ -227,7 +227,7 @@ $sync["Form"].Add_PreViewKeyDown($commonKeyEvents)
|
|||||||
$sync["Form"].Add_MouseLeftButtonDown({
|
$sync["Form"].Add_MouseLeftButtonDown({
|
||||||
# Hide Settings and Theme Popup on click anywhere else
|
# Hide Settings and Theme Popup on click anywhere else
|
||||||
if ($sync.SettingsButton.IsOpen -or
|
if ($sync.SettingsButton.IsOpen -or
|
||||||
$sync.ThemePopup.IsOpen){
|
$sync.ThemePopup.IsOpen) {
|
||||||
$sync.SettingsPopup.IsOpen = $false
|
$sync.SettingsPopup.IsOpen = $false
|
||||||
$sync.ThemePopup.IsOpen = $false
|
$sync.ThemePopup.IsOpen = $false
|
||||||
}
|
}
|
||||||
@ -237,7 +237,7 @@ $sync["Form"].Add_MouseLeftButtonDown({
|
|||||||
$sync["Form"].Add_MouseDoubleClick({
|
$sync["Form"].Add_MouseDoubleClick({
|
||||||
if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or
|
if ($_.OriginalSource -is [System.Windows.Controls.Grid] -or
|
||||||
$_.OriginalSource -is [System.Windows.Controls.StackPanel]) {
|
$_.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
|
$sync["Form"].WindowState = [Windows.WindowState]::Maximized
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -250,7 +250,7 @@ $sync["Form"].Add_Deactivated({
|
|||||||
Write-Debug "WinUtil lost focus"
|
Write-Debug "WinUtil lost focus"
|
||||||
# Hide Settings and Theme Popup on Winutil Focus Loss
|
# Hide Settings and Theme Popup on Winutil Focus Loss
|
||||||
if ($sync.SettingsButton.IsOpen -or
|
if ($sync.SettingsButton.IsOpen -or
|
||||||
$sync.ThemePopup.IsOpen){
|
$sync.ThemePopup.IsOpen) {
|
||||||
$sync.SettingsPopup.IsOpen = $false
|
$sync.SettingsPopup.IsOpen = $false
|
||||||
$sync.ThemePopup.IsOpen = $false
|
$sync.ThemePopup.IsOpen = $false
|
||||||
}
|
}
|
||||||
@ -467,7 +467,7 @@ $sync["Form"].Add_Activated({
|
|||||||
})
|
})
|
||||||
# Define event handler for ThemeButton click
|
# Define event handler for ThemeButton click
|
||||||
$sync["ThemeButton"].Add_Click({
|
$sync["ThemeButton"].Add_Click({
|
||||||
if ($sync.ThemePopup.IsOpen){
|
if ($sync.ThemePopup.IsOpen) {
|
||||||
$sync.ThemePopup.IsOpen = $false
|
$sync.ThemePopup.IsOpen = $false
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -499,7 +499,7 @@ $sync["LightThemeMenuItem"].Add_Click({
|
|||||||
# Define event handler for button click
|
# Define event handler for button click
|
||||||
$sync["SettingsButton"].Add_Click({
|
$sync["SettingsButton"].Add_Click({
|
||||||
Write-Debug "SettingsButton clicked"
|
Write-Debug "SettingsButton clicked"
|
||||||
if ($sync.Settings.IsOpen){
|
if ($sync.Settings.IsOpen) {
|
||||||
$sync.Settings.IsOpen = $false
|
$sync.Settings.IsOpen = $false
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
Loading…
Reference in New Issue
Block a user