[02] Refactoring code (Reopening of PR #2469, plus some modifications to make PR #2629 merge easily without any problem) (#2630)

* Remove leftover comment & update another comment in 'Get-TabXaml' Private Function

* Add new 'CloseIconFontSize' Theme Option

This's done to fix the Visual Issue of the Close Button being smaller than the Settings Button.

* Rename 'CheckBoxBulletDecoratorFontSize' to 'CheckBoxBulletDecoratorSize'

* Experiment with DPI Aware Units

* Remove extra whitespace characters in 'theme.json'

* Implement Default Theming - Add Error Checking & Quitting Early upon XML Related Failures - Simple Code Formatting here & there

* Replace Tabs with Spaces to follow the conventions

* Fix some logic issue in 'Set-WinUtilUITheme.ps1' Private Function - Rename 'Set-WinUtilUiTheme.ps1' -> 'Set-WinUtilUITheme.ps1'

* Change output info from 'Write-Warning' to 'Write-Host' to make sure it's displayed even in RunSpaces as well as PowerShell 5 Environments

* Revert back to default Unit of Measuring for WPF (1/96 in)

* Revert "Remove leftover comment & update another comment in 'Get-TabXaml' Private Function"

This reverts commit 368e5980df.

* Update 'themes.json' so the general changes will work with PR #2629

* Support the fallback to default theme (if it exists)

* Update 'Set-WinUtilUITheme' Documentation

---------

Co-authored-by: MyDrift <personal@mdiana.ch>
This commit is contained in:
Mr.k 2024-08-28 19:08:39 +03:00 committed by GitHub
parent 99aff2aefc
commit 322d527a0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 261 additions and 256 deletions

View File

@ -1,220 +1,169 @@
{ {
"Classic": { "_default": {
"CustomDialogFontSize": "12", "CustomDialogFontSize": "12",
"CustomDialogFontSizeHeader": "14", "CustomDialogFontSizeHeader": "14",
"CustomDialogIconSize": "25", "CustomDialogIconSize": "25",
"CustomDialogWidth": "400", "CustomDialogWidth": "400",
"CustomDialogHeight": "200", "CustomDialogHeight": "200",
"FontSize": "12", "FontSize": "14",
"FontFamily": "Arial", "FontFamily": "Arial",
"FontSizeHeading": "14", "FontSizeHeading": "16",
"HeaderFontFamily": "Consolas, Monaco", "HeaderFontFamily": "Consolas, Monaco",
"CheckBoxBulletDecoratorFontSize": "14", "CheckBoxBulletDecoratorSize": "14",
"CheckBoxMargin": "15,0,0,2", "CheckBoxMargin": "15,0,0,2",
"TabButtonFontSize": "14", "TabContentMargin": "5",
"TabButtonWidth": "100", "TabButtonFontSize": "14",
"TabButtonHeight": "25", "TabButtonWidth": "100",
"TabRowHeightInPixels": "50", "TabButtonHeight": "25",
"IconFontSize": "14", "TabRowHeightInPixels": "50",
"IconButtonSize": "35", "IconFontSize": "14",
"WinUtilIconSize": "Auto", "IconButtonSize": "35",
"SettingsIconFontSize": "18", "WinUtilIconSize": "Auto",
"SettingsIconFontSize": "18",
"CloseIconFontSize": "18",
"MicroWinLogoSize": "10", "MicroWinLogoSize": "10",
"ProgressBarForegroundColor": "#FFAC1C", "ProgressBarForegroundColor": "#FFAC1C",
"ProgressBarBackgroundColor": "Transparent", "ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#000000", "ProgressBarTextColor": "#000000",
"ComboBoxBackgroundColor": "#FFFFFF", "ComboBoxBackgroundColor": "#FFFFFF",
"LabelboxForegroundColor": "#000000", "LabelboxForegroundColor": "#000000",
"MainForegroundColor": "#000000", "MainForegroundColor": "#000000",
"MainBackgroundColor": "#FFFFFF", "MainBackgroundColor": "#FFFFFF",
"LabelBackgroundColor": "#FAFAFA", "LabelBackgroundColor": "#FAFAFA",
"LinkForegroundColor": "#000000", "LinkForegroundColor": "#000000",
"LinkHoverForegroundColor": "#000000", "LinkHoverForegroundColor": "#000000",
"GroupBorderBackgroundColor": "#000000", "GroupBorderBackgroundColor": "#000000",
"ComboBoxForegroundColor": "#000000", "ComboBoxForegroundColor": "#000000",
"ButtonFontSize": "12", "ButtonFontSize": "12",
"ButtonFontFamily": "Arial", "ButtonFontFamily": "Arial",
"ButtonWidth": "200", "ButtonWidth": "200",
"ButtonHeight": "25", "ButtonHeight": "25",
"ConfigTabButtonFontSize": "16", "ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200", "SearchBarWidth": "200",
"SearchBarHeight": "25", "SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16", "SearchBarTextBoxFontSize": "12",
"SearchBarClearButtonFontSize": "14", "SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#FFFFFF", "ButtonInstallBackgroundColor": "#FFFFFF",
"ButtonTweaksBackgroundColor": "#FFFFFF", "ButtonTweaksBackgroundColor": "#FFFFFF",
"ButtonConfigBackgroundColor": "#FFFFFF", "ButtonConfigBackgroundColor": "#FFFFFF",
"ButtonUpdatesBackgroundColor": "#FFFFFF", "ButtonUpdatesBackgroundColor": "#FFFFFF",
"ButtonInstallForegroundColor": "#000000", "ButtonInstallForegroundColor": "#000000",
"ButtonTweaksForegroundColor": "#000000", "ButtonTweaksForegroundColor": "#000000",
"ButtonConfigForegroundColor": "#000000", "ButtonConfigForegroundColor": "#000000",
"ButtonUpdatesForegroundColor": "#000000", "ButtonUpdatesForegroundColor": "#000000",
"ButtonBackgroundColor": "#F5F5F5", "ButtonBackgroundColor": "#F5F5F5",
"ButtonBackgroundPressedColor": "#1A1A1A", "ButtonBackgroundPressedColor": "#1A1A1A",
"CheckboxMouseOverColor": "#999999", "CheckboxMouseOverColor": "#999999",
"ButtonBackgroundMouseoverColor": "#C2C2C2", "ButtonBackgroundMouseoverColor": "#C2C2C2",
"ButtonBackgroundSelectedColor": "#F0F0F0", "ButtonBackgroundSelectedColor": "#F0F0F0",
"ButtonForegroundColor": "#000000", "ButtonForegroundColor": "#000000",
"ToggleButtonOnColor": "#2e77ff", "ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1", "ButtonBorderThickness": "1",
"ButtonMargin": "1", "ButtonMargin": "1",
"ButtonCornerRadius": "2", "ButtonCornerRadius": "2",
"BorderColor": "#000000", "BorderColor": "#000000",
"BorderOpacity": "0.2", "BorderOpacity": "0.2",
"ShadowPulse": "Forever" "ShadowPulse": "Forever"
}, },
"Matrix": { "Classic": {
"CustomDialogFontSize": "12", "ComboBoxBackgroundColor": "#FFFFFF",
"CustomDialogFontSizeHeader": "14", "LabelboxForegroundColor": "#000000",
"CustomDialogIconSize": "25", "MainForegroundColor": "#000000",
"CustomDialogWidth": "400", "MainBackgroundColor": "#FFFFFF",
"CustomDialogHeight": "200", "LabelBackgroundColor": "#FAFAFA",
"LinkForegroundColor": "#000000",
"LinkHoverForegroundColor": "#000000",
"GroupBorderBackgroundColor": "#000000",
"ComboBoxForegroundColor": "#000000",
"FontSize": "12", "ButtonInstallBackgroundColor": "#FFFFFF",
"FontFamily": "Arial", "ButtonTweaksBackgroundColor": "#FFFFFF",
"FontSizeHeading": "14", "ButtonConfigBackgroundColor": "#FFFFFF",
"HeaderFontFamily": "Consolas, Monaco", "ButtonUpdatesBackgroundColor": "#FFFFFF",
"ButtonInstallForegroundColor": "#000000",
"ButtonTweaksForegroundColor": "#000000",
"ButtonConfigForegroundColor": "#000000",
"ButtonUpdatesForegroundColor": "#000000",
"ButtonBackgroundColor": "#F5F5F5",
"ButtonBackgroundPressedColor": "#1A1A1A",
"CheckboxMouseOverColor": "#999999",
"ButtonBackgroundMouseoverColor": "#C2C2C2",
"ButtonBackgroundSelectedColor": "#F0F0F0",
"ButtonForegroundColor": "#000000",
"ToggleButtonOnColor": "#2e77ff"
},
"Matrix": {
"ComboBoxBackgroundColor": "#000000",
"LabelboxForegroundColor": "#FFEE58",
"MainForegroundColor": "#9CCC65",
"MainBackgroundColor": "#000000",
"LabelBackgroundColor": "#000000",
"LinkForegroundColor": "#add8e6",
"LinkHoverForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58",
"CheckBoxBulletDecoratorFontSize": "14", "ProgressBarForegroundColor": "#222222",
"CheckBoxMargin": "15,0,0,2", "ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#cccccc",
"TabButtonFontSize": "14", "ButtonInstallBackgroundColor": "#222222",
"TabButtonWidth": "100", "ButtonTweaksBackgroundColor": "#333333",
"TabButtonHeight": "25", "ButtonConfigBackgroundColor": "#444444",
"TabRowHeightInPixels": "50", "ButtonUpdatesBackgroundColor": "#555555",
"IconFontSize": "14", "ButtonInstallForegroundColor": "#FFFFFF",
"IconButtonSize": "35", "ButtonTweaksForegroundColor": "#FFFFFF",
"WinUtilIconSize": "Auto", "ButtonConfigForegroundColor": "#FFFFFF",
"SettingsIconFontSize": "18", "ButtonUpdatesForegroundColor": "#FFFFFF",
"ButtonBackgroundColor": "#000019",
"ButtonBackgroundPressedColor": "#FFFFFF",
"ButtonBackgroundMouseoverColor": "#A55A64",
"ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff",
"MicroWinLogoSize": "10", "BorderColor": "#FFAC1C",
"BorderOpacity": "0.8",
"ShadowPulse": "0:0:3"
},
"Dark": {
"ComboBoxBackgroundColor": "#000000",
"LabelboxForegroundColor": "#FFEE58",
"MainForegroundColor": "#9CCC65",
"MainBackgroundColor": "#000000",
"LabelBackgroundColor": "#000000",
"LinkForegroundColor": "#add8e6",
"LinkHoverForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58",
"ProgressBarForegroundColor": "#222222", "ProgressBarForegroundColor": "#222222",
"ProgressBarBackgroundColor": "Transparent", "ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#cccccc", "ProgressBarTextColor": "#cccccc",
"ComboBoxBackgroundColor": "#000000", "ButtonInstallBackgroundColor": "#222222",
"LabelboxForegroundColor": "#FFEE58", "ButtonTweaksBackgroundColor": "#333333",
"MainForegroundColor": "#9CCC65", "ButtonConfigBackgroundColor": "#444444",
"MainBackgroundColor": "#000000", "ButtonUpdatesBackgroundColor": "#555555",
"LabelBackgroundColor": "#000000", "ButtonInstallForegroundColor": "#FFFFFF",
"LinkForegroundColor": "#add8e6", "ButtonTweaksForegroundColor": "#FFFFFF",
"LinkHoverForegroundColor": "#FFFFFF", "ButtonConfigForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58", "ButtonUpdatesForegroundColor": "#FFFFFF",
"ButtonBackgroundColor": "#000019",
"ButtonBackgroundPressedColor": "#9CCC65",
"ButtonBackgroundMouseoverColor": "#FF5733",
"ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff",
"ButtonFontSize": "12", "BorderColor": "#FFAC1C"
"ButtonFontFamily": "Arial", }
"ButtonWidth": "200",
"ButtonHeight": "25",
"ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222",
"ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444",
"ButtonUpdatesBackgroundColor": "#555555",
"ButtonInstallForegroundColor": "#FFFFFF",
"ButtonTweaksForegroundColor": "#FFFFFF",
"ButtonConfigForegroundColor": "#FFFFFF",
"ButtonUpdatesForegroundColor": "#FFFFFF",
"ButtonBackgroundColor": "#000019",
"ButtonBackgroundPressedColor": "#FFFFFF",
"ButtonBackgroundMouseoverColor": "#A55A64",
"ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1",
"ButtonMargin": "1",
"ButtonCornerRadius": "2",
"BorderColor": "#FFAC1C",
"BorderOpacity": "0.8",
"ShadowPulse": "0:0:3"
},
"Dark": {
"CustomDialogFontSize": "12",
"CustomDialogFontSizeHeader": "14",
"CustomDialogIconSize": "25",
"CustomDialogWidth": "400",
"CustomDialogHeight": "200",
"FontSize": "12",
"FontFamily": "Arial",
"FontSizeHeading": "14",
"HeaderFontFamily": "Consolas, Monaco",
"CheckBoxBulletDecoratorFontSize": "14",
"CheckBoxMargin": "15,0,0,2",
"TabButtonFontSize": "14",
"TabButtonWidth": "100",
"TabButtonHeight": "25",
"TabRowHeightInPixels": "50",
"IconFontSize": "14",
"IconButtonSize": "35",
"WinUtilIconSize": "Auto",
"SettingsIconFontSize": "18",
"MicroWinLogoSize": "10",
"ProgressBarForegroundColor": "#222222",
"ProgressBarBackgroundColor": "Transparent",
"ProgressBarTextColor": "#FFFFFF",
"ComboBoxBackgroundColor": "#000000",
"LabelboxForegroundColor": "#FFEE58",
"MainForegroundColor": "#9CCC65",
"MainBackgroundColor": "#000000",
"LabelBackgroundColor": "#000000",
"LinkForegroundColor": "#add8e6",
"LinkHoverForegroundColor": "#FFFFFF",
"ComboBoxForegroundColor": "#FFEE58",
"ButtonFontSize": "12",
"ButtonFontFamily": "Arial",
"ButtonWidth": "200",
"ButtonHeight": "25",
"ConfigTabButtonFontSize": "16",
"SearchBarWidth": "200",
"SearchBarHeight": "25",
"SearchBarTextBoxFontSize": "16",
"SearchBarClearButtonFontSize": "14",
"ButtonInstallBackgroundColor": "#222222",
"ButtonTweaksBackgroundColor": "#333333",
"ButtonConfigBackgroundColor": "#444444",
"ButtonUpdatesBackgroundColor": "#555555",
"ButtonInstallForegroundColor": "#FFFFFF",
"ButtonTweaksForegroundColor": "#FFFFFF",
"ButtonConfigForegroundColor": "#FFFFFF",
"ButtonUpdatesForegroundColor": "#FFFFFF",
"ButtonBackgroundColor": "#000019",
"ButtonBackgroundPressedColor": "#9CCC65",
"ButtonBackgroundMouseoverColor": "#FF5733",
"ButtonBackgroundSelectedColor": "#FF5733",
"ButtonForegroundColor": "#9CCC65",
"ToggleButtonOnColor": "#2e77ff",
"ButtonBorderThickness": "1",
"ButtonMargin": "1",
"ButtonCornerRadius": "2",
"BorderColor": "#FFAC1C",
"BorderOpacity": "0.2",
"ShadowPulse": "Forever"
}
} }

View File

@ -0,0 +1,83 @@
function Set-WinUtilUITheme {
<#
.SYNOPSIS
Sets the theme of the XAML file
.PARAMETER inputXML
A string representing the XAML object to modify
.PARAMETER customThemeName
The name of the custom theme to set the XAML to. Defaults to 'matrix'
.PARAMETER defaultThemeName
The name of the default theme to use when setting the XAML. Defaults to '_default'
.EXAMPLE
$returnVal = Set-WinUtilUITheme -inputXAML $inputXAML
if ($returnVal[0] -eq "") {
Write-Host "Failed to process inputXML"
} else {
$inputXML = $returnVal[0]
}
# to know which theme this function has used, access the second item in returned value.
Write-Host "Theme used in processing: $($returnVal[1])"
#>
param (
[Parameter(Mandatory, position=0)]
[string]$inputXML,
[Parameter(position=1)]
[string]$customThemeName = 'matrix',
[Parameter(position=2)]
[string]$defaultThemeName = '_default'
)
try {
# Note:
# Reason behind not caching the '$sync.configs.themes` object into a variable,
# because this code can modify the themes object.. meaning it's better to access it
# using the more verbose way, rather than introduce possible bugs into the code, just for the sake of readability.
#
if (-NOT $sync.configs.themes) {
throw [GenericException]::new("[Set-WinUtilTheme] Did not find 'config.themes' inside `$sync variable.")
}
if (-NOT $sync.configs.themes.$defaultThemeName) {
throw [GenericException]::new("[Set-WinUtilTheme] Did not find '$defaultThemeName' theme in the themes config file.")
}
$themeToUse = $customThemeName
if ($sync.configs.themes.$themeToUse) {
# Loop through every default theme option, and modify the custom theme in $sync variable,
# so that it has full options available for other functions to use.
foreach ($option in $sync.configs.themes.$defaultThemeName.PSObject.Properties) {
$optionName = $option.Name
$optionValue = $option.Value
if (-NOT $sync.configs.themes.$themeToUse.$optionName) {
$sync.configs.themes.$themeToUse | Add-Member -MemberType NoteProperty -Name $optionName -Value $optionValue
}
}
} else {
Write-Debug "[Set-WinUtilTheme] Theme '$customThemeName' was not found, using '$defaultThemeName' instead."
$themeToUse = $defaultThemeName
}
foreach ($property in $sync.configs.themes.$themeToUse.PSObject.Properties) {
$key = $property.Name
$value = $property.Value
# Add curly braces around the key
$formattedKey = "{$key}"
# Replace the key with the value in the input XML
$inputXML = $inputXML.Replace($formattedKey, $value)
}
}
catch {
Write-Host "[Set-WinUtilTheme] Unable to apply theme" -ForegroundColor Red
Write-Host "$($psitem.Exception.Message)" -ForegroundColor Red
$inputXML = "" # Make inputXML equal an empty string, indicating something went wrong to the function caller.
}
return @($inputXML, $themeToUse);
}

View File

@ -1,50 +0,0 @@
function Set-WinUtilUITheme {
<#
.SYNOPSIS
Sets the theme of the XAML file
.PARAMETER inputXML
A string representing the XAML object to modify
.PARAMETER themeName
The name of the theme to set the XAML to. Defaults to 'matrix'
.EXAMPLE
Set-WinUtilUITheme -inputXAML $inputXAML
#>
param
(
[Parameter(Mandatory, position=0)]
[string]$inputXML,
[Parameter(position=1)]
[string]$themeName = 'matrix'
)
try {
# Convert the JSON to a PowerShell object
$themes = $sync.configs.themes
# Select the specified theme
$selectedTheme = $themes.$themeName
if ($selectedTheme) {
# Loop through all key-value pairs in the selected theme
foreach ($property in $selectedTheme.PSObject.Properties) {
$key = $property.Name
$value = $property.Value
# Add curly braces around the key
$formattedKey = "{$key}"
# Replace the key with the value in the input XML
$inputXML = $inputXML.Replace($formattedKey, $value)
}
} else {
Write-Host "Theme '$themeName' not found."
}
} catch {
Write-Warning "Unable to apply theme"
Write-Warning $psitem.Exception.StackTrace
}
return $inputXML;
}

View File

@ -52,6 +52,7 @@ $sync.runspace.Open()
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window' $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
$defaulttheme = '_default'
if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) { if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
if (Invoke-WinUtilGPU -eq $True) { if (Invoke-WinUtilGPU -eq $True) {
$ctttheme = 'Matrix' $ctttheme = 'Matrix'
@ -61,15 +62,28 @@ if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) {
} else { } else {
$ctttheme = 'Classic' $ctttheme = 'Classic'
} }
$inputXML = Set-WinUtilUITheme -inputXML $inputXML -themeName $ctttheme
$returnVal = Set-WinUtilUITheme -inputXML $inputXML -customThemeName $ctttheme -defaultThemeName $defaulttheme
if ($returnVal[0] -eq "") {
Write-Host "Failed to statically apply theming to xaml content using Set-WinUtilTheme, please check previous Error/Warning messages." -ForegroundColor Red
Write-Host "Quitting winutil..." -ForegroundColor Red
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
exit 1
}
$inputXML = $returnVal[0]
$ctttheme = $returnVal[1]
[void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework') [void][System.Reflection.Assembly]::LoadWithPartialName('presentationframework')
[xml]$XAML = $inputXML [xml]$XAML = $inputXML
# Read the XAML file # Read the XAML file
$readerOperationSuccessful = $false # There's more cases of failure then success.
$reader = (New-Object System.Xml.XmlNodeReader $xaml) $reader = (New-Object System.Xml.XmlNodeReader $xaml)
try { try {
$sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader ) $sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader )
$readerOperationSuccessful = $true
} catch [System.Management.Automation.MethodInvocationException] { } catch [System.Management.Automation.MethodInvocationException] {
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..." Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
Write-Host $error[0].Exception.Message -ForegroundColor Red Write-Host $error[0].Exception.Message -ForegroundColor Red
@ -81,6 +95,15 @@ try {
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed." Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
} }
if (-NOT ($readerOperationSuccessful)) {
Write-Host "Failed to parse xaml content using Windows.Markup.XamlReader's Load Method." -ForegroundColor Red
Write-Host "Quitting winutil..." -ForegroundColor Red
$sync.runspace.Dispose()
$sync.runspace.Close()
[System.GC]::Collect()
exit 1
}
#=========================================================================== #===========================================================================
# Store Form Objects In PowerShell # Store Form Objects In PowerShell
#=========================================================================== #===========================================================================

View File

@ -305,13 +305,13 @@
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}"> <Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}">
<BulletDecorator Background="Transparent"> <BulletDecorator Background="Transparent">
<BulletDecorator.Bullet> <BulletDecorator.Bullet>
<Grid Width="{CheckBoxBulletDecoratorFontSize}" Height="{CheckBoxBulletDecoratorFontSize}"> <Grid Width="{CheckBoxBulletDecoratorSize}" Height="{CheckBoxBulletDecoratorSize}">
<Border x:Name="Border" <Border x:Name="Border"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{TemplateBinding BorderBrush}"
Background="{ButtonBackgroundColor}" Background="{ButtonBackgroundColor}"
BorderThickness="1" BorderThickness="1"
Width="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}" Width="{Binding Path={CheckBoxBulletDecoratorSize}-2}"
Height="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}" Height="{Binding Path={CheckBoxBulletDecoratorSize}-2}"
Margin="2" Margin="2"
SnapsToDevicePixels="True"/> SnapsToDevicePixels="True"/>
<Path x:Name="CheckMark" <Path x:Name="CheckMark"
@ -774,7 +774,7 @@
HorizontalAlignment="Right" VerticalAlignment="Top" HorizontalAlignment="Right" VerticalAlignment="Top"
Margin="0,5,5,0" Margin="0,5,5,0"
FontFamily="Arial" FontFamily="Arial"
Foreground="{MainForegroundColor}" FontSize="{IconFontSize}" Name="WPFCloseButton" /> Foreground="{MainForegroundColor}" FontSize="{CloseIconFontSize}" Name="WPFCloseButton" />
</Grid> </Grid>
</DockPanel> </DockPanel>