diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index f7a8aec..0c89d67 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,6 +1,6 @@
name: "🐞 Bug report"
description: "Report an issue you encountered"
-labels: ["bug","unconfirmed"]
+labels: ["bug", "unconfirmed"]
body:
- type: markdown
diff --git a/Config/Apps.json b/Config/Apps.json
index 6a034f6..ebe86b3 100644
--- a/Config/Apps.json
+++ b/Config/Apps.json
@@ -1033,7 +1033,7 @@
],
"Presets": [
{
- "Name": "Xbox Gaming apps",
+ "Name": "Xbox gaming apps",
"AppIds": [
"Microsoft.GamingApp",
"Microsoft.XboxGameOverlay",
diff --git a/Schemas/AboutWindow.xaml b/Schemas/AboutWindow.xaml
index e44d37c..4ef56c5 100644
--- a/Schemas/AboutWindow.xaml
+++ b/Schemas/AboutWindow.xaml
@@ -35,7 +35,7 @@
-
+
@@ -79,15 +79,15 @@
-
+
@@ -107,7 +107,7 @@
FontWeight="SemiBold"
FontFamily="Segoe Fluent Icons"
Text=""
- Foreground="{DynamicResource CloseHover}"
+ Foreground="{DynamicResource TitleBarCloseHoverColor}"
Margin="0,0,8,0"/>
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Schemas/AppSelectionWindow.xaml b/Schemas/AppSelectionWindow.xaml
index 8f0c417..c31959a 100644
--- a/Schemas/AppSelectionWindow.xaml
+++ b/Schemas/AppSelectionWindow.xaml
@@ -7,12 +7,12 @@
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
- Foreground="{DynamicResource FgColor}">
+ Foreground="{DynamicResource AppFgColor}">
-
-
+
@@ -66,7 +66,7 @@
@@ -90,27 +90,27 @@
-
+
-
+
-
+
-
+
diff --git a/Schemas/ApplyChangesWindow.xaml b/Schemas/ApplyChangesWindow.xaml
index ccafe5e..8a98941 100644
--- a/Schemas/ApplyChangesWindow.xaml
+++ b/Schemas/ApplyChangesWindow.xaml
@@ -36,10 +36,10 @@
@@ -56,7 +56,7 @@
Text=""
FontFamily="Segoe Fluent Icons"
FontSize="36"
- Foreground="{DynamicResource ButtonBg}"
+ Foreground="{DynamicResource ButtonBgColor}"
HorizontalAlignment="Center"
Margin="0,0,0,16"
RenderTransformOrigin="0.5,0.5">
@@ -102,7 +102,7 @@
@@ -117,7 +117,7 @@
Text=""
FontFamily="Segoe Fluent Icons"
FontSize="40"
- Foreground="{DynamicResource ButtonBg}"
+ Foreground="{DynamicResource ButtonBgColor}"
HorizontalAlignment="Center"
Margin="0,0,0,12"/>
@@ -134,7 +134,7 @@
@@ -149,7 +149,7 @@
diff --git a/Schemas/BubbleHint.xaml b/Schemas/BubbleHint.xaml
index d388267..0693cc2 100644
--- a/Schemas/BubbleHint.xaml
+++ b/Schemas/BubbleHint.xaml
@@ -26,7 +26,7 @@
Text="View the selected changes here"
TextWrapping="Wrap"
MaxWidth="260"
- Foreground="{DynamicResource FgColor}"/>
+ Foreground="{DynamicResource AppFgColor}"/>
diff --git a/Schemas/ImportExportConfigWindow.xaml b/Schemas/ImportExportConfigWindow.xaml
index 6eb7198..1fd6ac1 100644
--- a/Schemas/ImportExportConfigWindow.xaml
+++ b/Schemas/ImportExportConfigWindow.xaml
@@ -29,12 +29,12 @@
-
+
diff --git a/Schemas/MainWindow.xaml b/Schemas/MainWindow.xaml
index 6d2d86c..975d6d8 100644
--- a/Schemas/MainWindow.xaml
+++ b/Schemas/MainWindow.xaml
@@ -7,9 +7,9 @@
SnapsToDevicePixels="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
- AllowsTransparency="False"
- Background="{DynamicResource BgColor}"
- Foreground="{DynamicResource FgColor}">
+ AllowsTransparency="True"
+ Background="Transparent"
+ Foreground="{DynamicResource AppFgColor}">
@@ -46,28 +46,30 @@
@@ -83,7 +85,7 @@
-
+
@@ -95,17 +97,18 @@
-
+
-
+
-
-
-
-
-
-
@@ -194,7 +159,7 @@
16
- 151
+ 180
1*
261
@@ -222,7 +187,7 @@
@@ -257,25 +232,12 @@
-
+
+
-
-
-
-
-
-
-
@@ -283,7 +245,7 @@
-
@@ -372,7 +334,7 @@
-
+
@@ -380,10 +342,20 @@
+ FontSize="12">
+
+
+
+
-
+
@@ -692,34 +652,34 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -736,7 +696,7 @@
-
+
@@ -745,7 +705,7 @@
-
+
@@ -754,10 +714,10 @@
-
+
-
-
+
+
@@ -770,11 +730,11 @@
-
+
-
+
@@ -813,47 +773,42 @@
-
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -878,7 +833,7 @@
-
+
@@ -888,7 +843,7 @@
-
+
@@ -903,10 +858,10 @@
-
+
-
-
+
+
@@ -926,15 +881,15 @@
-
+
-
+
-
+
@@ -942,12 +897,12 @@
-
+
-
+
@@ -965,7 +920,7 @@
-
+
@@ -975,7 +930,7 @@
-
+
@@ -986,23 +941,23 @@
-
+
-
+
-
+
-
+
-
+
@@ -1022,17 +977,17 @@
-
+
-
+
-
+
-
+
diff --git a/Schemas/MessageBoxWindow.xaml b/Schemas/MessageBox.xaml
similarity index 67%
rename from Schemas/MessageBoxWindow.xaml
rename to Schemas/MessageBox.xaml
index 9c9f009..1324603 100644
--- a/Schemas/MessageBoxWindow.xaml
+++ b/Schemas/MessageBox.xaml
@@ -12,7 +12,7 @@
Topmost="False"
ShowInTaskbar="False">
-
-
+
+ Style="{DynamicResource ModalTitleTextStyle}"/>
@@ -55,7 +51,7 @@
Grid.Column="0"
FontFamily="Segoe Fluent Icons"
FontSize="24"
- Foreground="{DynamicResource FgColor}"
+ Foreground="{DynamicResource AppFgColor}"
VerticalAlignment="Center"
Margin="4,0,14,0"
Visibility="Collapsed"/>
@@ -67,7 +63,7 @@
TextWrapping="Wrap"
FontSize="14"
LineHeight="20"
- Foreground="{DynamicResource FgColor}"
+ Foreground="{DynamicResource AppFgColor}"
VerticalAlignment="Center"
Margin="0,0,20,0"/>
@@ -75,24 +71,27 @@
-
-
-
+
+
+
+
+
+
+
-
+
diff --git a/Schemas/RestoreBackupWindow.xaml b/Schemas/RestoreBackupWindow.xaml
index 4373d0f..079f6f3 100644
--- a/Schemas/RestoreBackupWindow.xaml
+++ b/Schemas/RestoreBackupWindow.xaml
@@ -14,8 +14,8 @@
@@ -96,7 +96,7 @@
-
+
+ Foreground="{DynamicResource AppFgColor}"
+ Text="This will restore any system registry changes made by Win11Debloat to the previous state. You can review the changes after selecting a backup file. Removed applications will need to be reinstalled manually."/>
@@ -247,7 +247,7 @@
-
+
@@ -258,7 +258,7 @@
@@ -270,7 +270,7 @@
-
+
@@ -279,12 +279,12 @@
-
+
@@ -295,7 +295,7 @@
@@ -307,13 +307,13 @@
-
+
-
+
@@ -325,7 +325,7 @@
@@ -337,7 +337,7 @@
-
+
@@ -373,7 +373,7 @@
FontSize="14"
LineHeight="20"
Margin="0,0,0,12"
- Foreground="{DynamicResource FgColor}"
+ Foreground="{DynamicResource AppFgColor}"
Text="This will restore the Start Menu pinned apps layout for the selected user(s) using a backup that is automatically created by Win11Debloat. Manually created backups can also be used."/>
diff --git a/Schemas/SharedStyles.xaml b/Schemas/SharedStyles.xaml
index 931667b..4f905c2 100644
--- a/Schemas/SharedStyles.xaml
+++ b/Schemas/SharedStyles.xaml
@@ -3,9 +3,9 @@
@@ -93,7 +93,7 @@
@@ -119,7 +119,7 @@
+
+
+
+
+
+
+
+
+
diff --git a/Scripts/AppRemoval/RemoveApps.ps1 b/Scripts/AppRemoval/RemoveApps.ps1
index 0695029..3a729ba 100644
--- a/Scripts/AppRemoval/RemoveApps.ps1
+++ b/Scripts/AppRemoval/RemoveApps.ps1
@@ -1,3 +1,24 @@
+<#
+ .SYNOPSIS
+ Removes one or more Windows app packages based on the target scope.
+
+ .DESCRIPTION
+ Iterates over the provided list of app identifiers and removes each one.
+ Apps are removed via WinGet (for OneDrive and Microsoft Edge) or via
+ Remove-AppxPackage / Remove-ProvisionedAppxPackage (for all other apps).
+ The target scope is determined by script-level parameters:
+ -Sysprep removes from the OS image for future users; -User targets a
+ specific user; otherwise the current user is targeted.
+
+ .PARAMETER appsList
+ An array of app package identifiers to remove (e.g. 'Microsoft.BingNews').
+
+ .EXAMPLE
+ RemoveApps @('Microsoft.BingNews', 'Microsoft.BingWeather')
+
+ .EXAMPLE
+ RemoveApps -appsList (GenerateAppsList)
+#>
# Removes apps specified during function call based on the target scope.
function RemoveApps {
param (
@@ -22,7 +43,7 @@ function RemoveApps {
# Update step name and sub-progress to show which app is being removed (only for bulk removal)
if ($script:ApplySubStepCallback -and $appCount -gt 1) {
- & $script:ApplySubStepCallback "Removing apps ($appIndex/$appCount)" $appIndex $appCount
+ & $script:ApplySubStepCallback "Removing apps... ($appIndex/$appCount)" $appIndex $appCount
}
Write-Host "Removing $app"
diff --git a/Scripts/GUI/MainWindow-TweaksBuilder.ps1 b/Scripts/GUI/MainWindow-TweaksBuilder.ps1
index 95abb31..6125aec 100644
--- a/Scripts/GUI/MainWindow-TweaksBuilder.ps1
+++ b/Scripts/GUI/MainWindow-TweaksBuilder.ps1
@@ -148,7 +148,7 @@ function Build-DynamicTweaks {
$helpBtn = New-Object System.Windows.Controls.Button
$helpBtn.Content = $helpIcon
- $helpBtn.ToolTip = "Open wiki for more info on '$categoryName' tweaks"
+ $helpBtn.ToolTip = "Open the wiki for more info on '$categoryName' tweaks"
$helpBtn.Tag = (GetWikiUrlForCategory -category $categoryName)
$helpBtn.Style = $Window.Resources['CategoryHelpLinkButtonStyle']
$helpBtn.Add_Click({
diff --git a/Scripts/GUI/SetWindowThemeResources.ps1 b/Scripts/GUI/SetWindowThemeResources.ps1
index 5a49710..e3f3462 100644
--- a/Scripts/GUI/SetWindowThemeResources.ps1
+++ b/Scripts/GUI/SetWindowThemeResources.ps1
@@ -1,3 +1,26 @@
+<#
+ .SYNOPSIS
+ Applies light or dark theme colors to a WPF window's resource dictionary.
+
+ .DESCRIPTION
+ Iterates over a predefined set of theme color categories and
+ populates the window's Resources with SolidColorBrush entries keyed by
+ category and resource name (e.g. "AppAccentColor"). Additionally loads and
+ merges shared XAML styles from the script's SharedStylesSchema path if
+ available.
+
+ .PARAMETER window
+ The WPF Window whose resource dictionary will be populated.
+
+ .PARAMETER usesDarkMode
+ When $true, dark theme colors are applied; when $false, light theme colors.
+
+ .EXAMPLE
+ SetWindowThemeResources -window $MainWindow -usesDarkMode $true
+
+ .EXAMPLE
+ SetWindowThemeResources -window $Dialog -usesDarkMode $false
+#>
# Sets resource colors for a WPF window based on dark mode preference
function SetWindowThemeResources {
param (
@@ -5,80 +28,99 @@ function SetWindowThemeResources {
[bool]$usesDarkMode
)
- if ($usesDarkMode) {
- $window.Resources.Add("BgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#202020")))
- $window.Resources.Add("FgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFFFFF")))
- $window.Resources.Add("CardBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#2b2b2b")))
- $window.Resources.Add("BorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#404040")))
- $window.Resources.Add("ButtonBorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#404040")))
- $window.Resources.Add("CheckBoxBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#272727")))
- $window.Resources.Add("CheckBoxBorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#808080")))
- $window.Resources.Add("CheckBoxHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#343434")))
- $window.Resources.Add("ComboBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#373737")))
- $window.Resources.Add("ComboHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#434343")))
- $window.Resources.Add("ComboItemBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#2c2c2c")))
- $window.Resources.Add("ComboItemHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#383838")))
- $window.Resources.Add("ComboItemSelectedColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#343434")))
- $window.Resources.Add("AccentColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFD700")))
- $window.Resources.Add("ButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#434343")))
- $window.Resources.Add("ButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#989898")))
- $window.Resources.Add("SecondaryButtonBg", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#393939")))
- $window.Resources.Add("SecondaryButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#2a2a2a")))
- $window.Resources.Add("SecondaryButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1e1e1e")))
- $window.Resources.Add("SecondaryButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3b3b3b")))
- $window.Resources.Add("SecondaryButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#787878")))
- $window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1f1f1f")))
- $window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3d3d3d")))
- $window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4b4b4b")))
- $window.Resources.Add("TitlebarButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#2d2d2d")))
- $window.Resources.Add("TitlebarButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#292929")))
- $window.Resources.Add("AppIdColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#afafaf")))
- $window.Resources.Add("SearchHighlightColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#4A4A2A")))
- $window.Resources.Add("SearchHighlightActiveColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#8A7000")))
- $window.Resources.Add("TableHeaderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#333333")))
- }
- else {
- $window.Resources.Add("BgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f3f3f3")))
- $window.Resources.Add("FgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#000000")))
- $window.Resources.Add("CardBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#fbfbfb")))
- $window.Resources.Add("BorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ededed")))
- $window.Resources.Add("ButtonBorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#d3d3d3")))
- $window.Resources.Add("CheckBoxBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f5f5f5")))
- $window.Resources.Add("CheckBoxBorderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#898989")))
- $window.Resources.Add("CheckBoxHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ececec")))
- $window.Resources.Add("ComboBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFFFFF")))
- $window.Resources.Add("ComboHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f8f8f8")))
- $window.Resources.Add("ComboItemBgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f9f9f9")))
- $window.Resources.Add("ComboItemHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f0f0f0")))
- $window.Resources.Add("ComboItemSelectedColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f3f3f3")))
- $window.Resources.Add("AccentColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ffae00")))
- $window.Resources.Add("ButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#bfbfbf")))
- $window.Resources.Add("ButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ffffff")))
- $window.Resources.Add("SecondaryButtonBg", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#fbfbfb")))
- $window.Resources.Add("SecondaryButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f6f6f6")))
- $window.Resources.Add("SecondaryButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f0f0f0")))
- $window.Resources.Add("SecondaryButtonDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f7f7f7")))
- $window.Resources.Add("SecondaryButtonTextDisabled", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#b7b7b7")))
- $window.Resources.Add("InputFocusColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#fbfbfb")))
- $window.Resources.Add("ScrollBarThumbColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#b9b9b9")))
- $window.Resources.Add("ScrollBarThumbHoverColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#8b8b8b")))
- $window.Resources.Add("TitlebarButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#e1e1e1")))
- $window.Resources.Add("TitlebarButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#e6e6e6")))
- $window.Resources.Add("AppIdColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#666666")))
- $window.Resources.Add("SearchHighlightColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFF4CE")))
- $window.Resources.Add("SearchHighlightActiveColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFD966")))
- $window.Resources.Add("TableHeaderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#ffffff")))
+ $ThemeColor = @{
+ App = @{
+ AccentColor = @{ Light = '#ffae00'; Dark = '#ffd700' }
+ BorderColor = @{ Light = '#ededed'; Dark = '#404040' }
+ BgColor = @{ Light = '#f3f3f3'; Dark = '#202020' }
+ FgColor = @{ Light = '#000000'; Dark = '#ffffff' }
+ IdColor = @{ Light = '#666666'; Dark = '#afafaf' }
+ }
+
+ Card = @{
+ BgColor = @{ Light = '#fbfbfb'; Dark = '#2b2b2b' }
+ }
+
+ Button = @{
+ BorderColor = @{ Light = '#d3d3d3'; Dark = '#404040' }
+ BgColor = @{ Light = '#0067c0'; Dark = '#0067c0' }
+ DisabledColor = @{ Light = '#bfbfbf'; Dark = '#434343' }
+ HoverColor = @{ Light = '#1975c5'; Dark = '#1975c5' }
+ PressedColor = @{ Light = '#3183ca'; Dark = '#3183ca' }
+ TextDisabledColor = @{ Light = '#ffffff'; Dark = '#989898' }
+ }
+
+ SecondaryButton = @{
+ BgColor = @{ Light = '#fbfbfb'; Dark = '#393939' }
+ DisabledColor = @{ Light = '#f7f7f7'; Dark = '#3b3b3b' }
+ HoverColor = @{ Light = '#f6f6f6'; Dark = '#2a2a2a' }
+ PressedColor = @{ Light = '#f0f0f0'; Dark = '#1e1e1e' }
+ TextDisabledColor = @{ Light = '#b7b7b7'; Dark = '#787878' }
+ }
+
+ CheckBox = @{
+ BgColor = @{ Light = '#f5f5f5'; Dark = '#272727' }
+ BorderColor = @{ Light = '#898989'; Dark = '#808080' }
+ HoverColor = @{ Light = '#ececec'; Dark = '#343434' }
+ }
+
+ ComboBox = @{
+ BgColor = @{ Light = '#ffffff'; Dark = '#373737' }
+ HoverColor = @{ Light = '#f8f8f8'; Dark = '#434343' }
+ ItemBgColor = @{ Light = '#f9f9f9'; Dark = '#2c2c2c' }
+ ItemHoverColor = @{ Light = '#f0f0f0'; Dark = '#383838' }
+ ItemSelectedColor = @{ Light = '#f3f3f3'; Dark = '#343434' }
+ }
+
+ TextBox = @{
+ BorderColor = @{ Light = '#bdbdbd'; Dark = '#989a9d' }
+ BgColor = @{ Light = '#fbfbfb'; Dark = '#2d2d2d' }
+ FocusColor = @{ Light = '#ffffff'; Dark = '#1f1f1f' }
+ HoverColor = @{ Light = '#f6f6f6'; Dark = '#323232' }
+ SideBorderColor = @{ Light = '#ececec'; Dark = '#343434' }
+ }
+
+ ScrollBar = @{
+ ThumbColor = @{ Light = '#b9b9b9'; Dark = '#3d3d3d' }
+ ThumbHoverColor = @{ Light = '#8b8b8b'; Dark = '#4b4b4b' }
+ }
+
+ TitleBar = @{
+ ButtonHoverColor = @{ Light = '#dcdcdc'; Dark = '#353535' }
+ ButtonPressedColor = @{ Light = '#cccccc'; Dark = '#333333' }
+ CloseHoverColor = @{ Light = '#e81123'; Dark = '#e81123' }
+ ClosePressedColor = @{ Light = '#f1707a'; Dark = '#f1707a' }
+ UnfocusedFgColor = @{ Light = '#868686'; Dark = '#969696' }
+ }
+
+ Search = @{
+ HighlightActiveColor = @{ Light = '#ffd966'; Dark = '#8a7000' }
+ HighlightColor = @{ Light = '#fff4ce'; Dark = '#4a4a2a' }
+ }
+
+ Table = @{
+ HeaderColor = @{ Light = '#ffffff'; Dark = '#303030' }
+ }
+
+ Icon = @{
+ ErrorColor = @{ Light = '#e81123'; Dark = '#e81123' }
+ InformationColor = @{ Light = '#0078d4'; Dark = '#0078d4' }
+ QuestionColor = @{ Light = '#0078d4'; Dark = '#0078d4' }
+ SuccessColor = @{ Light = '#107c10'; Dark = '#107c10' }
+ WarningColor = @{ Light = '#ffb900'; Dark = '#ffb900' }
+ }
}
- $window.Resources.Add("ButtonBg", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#0067c0")))
- $window.Resources.Add("ButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1E88E5")))
- $window.Resources.Add("ButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3284cc")))
- $window.Resources.Add("CloseHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#c42b1c")))
- $window.Resources.Add("InformationIconColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#0078D4")))
- $window.Resources.Add("SuccessIconColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#107C10")))
- $window.Resources.Add("WarningIconColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#FFB900")))
- $window.Resources.Add("ErrorIconColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#E81123")))
- $window.Resources.Add("QuestionIconColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#0078D4")))
+ $Theme = if ($usesDarkMode) { 'Dark' } else { 'Light' }
+
+ foreach ($Group in $ThemeColor.GetEnumerator()) {
+ foreach ($Resource in $Group.Value.GetEnumerator()) {
+ $ResourceName = $Group.Key + $Resource.Key
+ $window.Resources[$ResourceName] = [System.Windows.Media.SolidColorBrush]::new(
+ [System.Windows.Media.ColorConverter]::ConvertFromString($Resource.Value[$Theme])
+ )
+ }
+ }
# Load and merge shared styles
if ($script:SharedStylesSchema -and (Test-Path $script:SharedStylesSchema)) {
diff --git a/Scripts/GUI/Show-ApplyModal.ps1 b/Scripts/GUI/Show-ApplyModal.ps1
index d9ccfb5..9b112d1 100644
--- a/Scripts/GUI/Show-ApplyModal.ps1
+++ b/Scripts/GUI/Show-ApplyModal.ps1
@@ -178,7 +178,7 @@ function Show-ApplyModal {
$tb = [System.Windows.Controls.TextBlock]::new()
$tb.Text = "$([char]0x2022) $featureName"
$tb.FontSize = 12
- $tb.SetResourceReference([System.Windows.Controls.TextBlock]::ForegroundProperty, 'FgColor')
+ $tb.SetResourceReference([System.Windows.Controls.TextBlock]::ForegroundProperty, "AppFgColor")
$tb.Opacity = 0.85
$tb.Margin = [System.Windows.Thickness]::new(0, 2, 0, 0)
$applyRebootList.Children.Add($tb) | Out-Null
diff --git a/Scripts/GUI/Show-ConfigWindow.ps1 b/Scripts/GUI/Show-ConfigWindow.ps1
index 1482369..efae6f2 100644
--- a/Scripts/GUI/Show-ConfigWindow.ps1
+++ b/Scripts/GUI/Show-ConfigWindow.ps1
@@ -78,7 +78,7 @@ function Show-ImportExportConfigWindow {
$cb.Margin = [System.Windows.Thickness]::new(0,0,0,4)
$cb.FontSize = 14
$cb.FontWeight = [System.Windows.FontWeights]::Medium
- $cb.Foreground = $dlg.FindResource('FgColor')
+ $cb.Foreground = $dlg.FindResource("AppFgColor")
if ($DisabledCategories -contains $cat) {
$cb.IsChecked = $false
$cb.IsEnabled = $false
@@ -93,9 +93,9 @@ function Show-ImportExportConfigWindow {
$detailsText = New-Object System.Windows.Controls.TextBlock
$detailsText.Text = $CategoryDetails[$cat]
$detailsText.FontSize = 12
- $detailsText.Foreground = $dlg.FindResource('FgColor')
- $detailsText.Margin = [System.Windows.Thickness]::new(30,0,0,0)
- $detailsText.Opacity = 0.75
+ $detailsText.Foreground = $dlg.FindResource("AppFgColor")
+ $detailsText.Margin = [System.Windows.Thickness]::new(32,0,0,0)
+ $detailsText.Opacity = if ($DisabledCategories -contains $cat) { 0.45 } else { 0.75 }
$detailsText.TextWrapping = [System.Windows.TextWrapping]::Wrap
$container.Children.Add($detailsText) | Out-Null
}
@@ -286,11 +286,17 @@ function Build-CategoryDetails {
$details = @{}
if ($AppCount -gt 0) {
- $details['Applications'] = "$AppCount app$(if ($AppCount -ne 1) { 's' })"
+ $details['Applications'] = "$AppCount app$(if ($AppCount -ne 1) { 's' }) selected"
+ }
+ else {
+ $details['Applications'] = 'No apps selected'
}
if ($TweakCount -gt 0) {
- $details['System Tweaks'] = "$TweakCount tweak$(if ($TweakCount -ne 1) { 's' })"
+ $details['System Tweaks'] = "$TweakCount tweak$(if ($TweakCount -ne 1) { 's' }) selected"
+ }
+ else {
+ $details['System Tweaks'] = 'No tweaks selected'
}
if ($DeploymentSettings) {
diff --git a/Scripts/GUI/Show-MessageBox.ps1 b/Scripts/GUI/Show-MessageBox.ps1
index bfd46b0..4d2e9e7 100644
--- a/Scripts/GUI/Show-MessageBox.ps1
+++ b/Scripts/GUI/Show-MessageBox.ps1
@@ -87,27 +87,27 @@ function Show-MessageBox {
switch ($Icon) {
'Information' {
$iconText.Text = [char]0xE946
- $iconText.Foreground = $msgWindow.FindResource('InformationIconColor')
+ $iconText.Foreground = $msgWindow.FindResource('IconInformationColor')
$iconText.Visibility = 'Visible'
}
'Success' {
$iconText.Text = [char]0xE73E
- $iconText.Foreground = $msgWindow.FindResource('SuccessIconColor')
+ $iconText.Foreground = $msgWindow.FindResource('IconSuccessColor')
$iconText.Visibility = 'Visible'
}
'Warning' {
$iconText.Text = [char]0xE7BA
- $iconText.Foreground = $msgWindow.FindResource('WarningIconColor')
+ $iconText.Foreground = $msgWindow.FindResource('IconWarningColor')
$iconText.Visibility = 'Visible'
}
'Error' {
$iconText.Text = [char]0xEA39
- $iconText.Foreground = $msgWindow.FindResource('ErrorIconColor')
+ $iconText.Foreground = $msgWindow.FindResource('IconErrorColor')
$iconText.Visibility = 'Visible'
}
'Question' {
$iconText.Text = [char]0xE897
- $iconText.Foreground = $msgWindow.FindResource('QuestionIconColor')
+ $iconText.Foreground = $msgWindow.FindResource('IconQuestionColor')
$iconText.Visibility = 'Visible'
}
default {
@@ -121,6 +121,8 @@ function Show-MessageBox {
$button1.Content = 'OK'
$button1.Add_Click({ $msgWindow.Tag = 'OK'; $msgWindow.Close() })
$button2.Visibility = 'Collapsed'
+ # Right-align sole button by moving it to column 1
+ [System.Windows.Controls.Grid]::SetColumn($button1, 1)
}
'OKCancel' {
$button1.Content = 'OK'
diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1
index a3c018a..c9694c9 100644
--- a/Win11Debloat.ps1
+++ b/Win11Debloat.ps1
@@ -156,7 +156,7 @@ $script:RegistryBackupsPath = Join-Path $PSScriptRoot 'Backups'
$script:AssetsPath = Join-Path $PSScriptRoot 'Assets'
$script:AppSelectionSchema = Join-Path $schemasPath 'AppSelectionWindow.xaml'
$script:MainWindowSchema = Join-Path $schemasPath 'MainWindow.xaml'
-$script:MessageBoxSchema = Join-Path $schemasPath 'MessageBoxWindow.xaml'
+$script:MessageBoxSchema = Join-Path $schemasPath 'MessageBox.xaml'
$script:AboutWindowSchema = Join-Path $schemasPath 'AboutWindow.xaml'
$script:ApplyChangesWindowSchema = Join-Path $schemasPath 'ApplyChangesWindow.xaml'
$script:SharedStylesSchema = Join-Path $schemasPath 'SharedStyles.xaml'
@@ -209,7 +209,8 @@ Write-Host " " -NoNewline; Write-Host " (" -ForegroundColor
Write-Host " " -NoNewline; Write-Host " ( " -ForegroundColor DarkYellow -NoNewline; Write-Host "'" -ForegroundColor Red -NoNewline; Write-Host " ) " -ForegroundColor DarkYellow -NoNewline; Write-Host "*" -ForegroundColor Yellow
Write-Host ""
Write-Host " Win11Debloat is launching..." -ForegroundColor White
-Write-Host " Leave this window open" -ForegroundColor DarkGray
+Write-Host " Keep this window open" -ForegroundColor DarkGray
+Write-Host ""
Write-Host ""
# Log script output to 'Win11Debloat.log' at the specified path