From 0d9dc4ee004b981584b99534ca9e1b169cd1395f Mon Sep 17 00:00:00 2001
From: Padsala Tushal <57517785+padsalatushal@users.noreply.github.com>
Date: Sun, 9 Oct 2022 03:21:36 +0530
Subject: [PATCH] Added Dark Mode (#225)
---
MainWindow.xaml | 4 +++-
winutil.ps1 | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/MainWindow.xaml b/MainWindow.xaml
index f0b57bea..98a8b2ef 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -174,7 +174,9 @@
-
+
+
+
diff --git a/winutil.ps1 b/winutil.ps1
index e357ac34..99e63d3d 100644
--- a/winutil.ps1
+++ b/winutil.ps1
@@ -1231,6 +1231,22 @@ $WPFtweaksbutton.Add_Click({
[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
#===========================================================================