Added Dark Mode (#225)

This commit is contained in:
Padsala Tushal 2022-10-09 03:21:36 +05:30 committed by GitHub
parent 0b53287d6f
commit 0d9dc4ee00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -174,7 +174,9 @@
<CheckBox Name="EssTweaksHiber" Content="Disable Hibernation" Margin="5,0"/> <CheckBox Name="EssTweaksHiber" Content="Disable Hibernation" Margin="5,0"/>
<CheckBox Name="EssTweaksDVR" Content="Disable GameDVR" Margin="5,0"/> <CheckBox Name="EssTweaksDVR" Content="Disable GameDVR" Margin="5,0"/>
<CheckBox Name="EssTweaksServices" Content="Set Services to Manual" Margin="5,0"/> <CheckBox Name="EssTweaksServices" Content="Set Services to Manual" Margin="5,0"/>
<Label Content="Dark Theme" />
<Button Name="EnableDarkMode" Background="AliceBlue" Content="Enable" Margin="60,0" />
<Button Name="DisableDarkMode" Background="AliceBlue" Content="Disable" Margin="60,0"/>
</StackPanel> </StackPanel>
<StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="1" Grid.Column="1" Margin="10,5"> <StackPanel Background="#777777" SnapsToDevicePixels="True" Grid.Row="1" Grid.Column="1" Margin="10,5">

View File

@ -1231,6 +1231,22 @@ $WPFtweaksbutton.Add_Click({
[System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon) [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
}) })
$WPFEnableDarkMode.Add_Click({
Write-Host "Enabling Dark Mode"
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
Set-ItemProperty $Theme AppsUseLightTheme -Value 0
Write-Host "Enabled"
}
)
$WPFDisableDarkMode.Add_Click({
Write-Host "Disabling Dark Mode"
$Theme = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
Set-ItemProperty $Theme AppsUseLightTheme -Value 1
Write-Host "Disabled"
}
)
#=========================================================================== #===========================================================================
# Undo All # Undo All
#=========================================================================== #===========================================================================