mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-06-17 15:28:17 +00:00
Clean up styling to better match Windows fluent design guidelines
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -35,7 +35,7 @@ function SetWindowThemeResources {
|
||||
$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")))
|
||||
$window.Resources.Add("TableHeaderColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#303030")))
|
||||
}
|
||||
else {
|
||||
$window.Resources.Add("BgColor", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#f3f3f3")))
|
||||
@@ -71,8 +71,8 @@ function SetWindowThemeResources {
|
||||
}
|
||||
|
||||
$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("ButtonHover", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#1975c5")))
|
||||
$window.Resources.Add("ButtonPressed", [System.Windows.Media.SolidColorBrush]::new([System.Windows.Media.ColorConverter]::ConvertFromString("#3183ca")))
|
||||
$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")))
|
||||
|
||||
@@ -94,8 +94,8 @@ function Show-ImportExportConfigWindow {
|
||||
$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.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) {
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user