mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-07-03 07:08:27 +00:00
Clean up styling to better match Windows fluent design guidelines (#638)
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user