From f8f85ca8614f09c3064d1cc67b1b3fe89115da93 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:36:16 +0100 Subject: [PATCH] Refactor checkbox style assignment in config window --- Scripts/GUI/Show-ConfigWindow.ps1 | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Scripts/GUI/Show-ConfigWindow.ps1 b/Scripts/GUI/Show-ConfigWindow.ps1 index 93d4126..7ea3f47 100644 --- a/Scripts/GUI/Show-ConfigWindow.ps1 +++ b/Scripts/GUI/Show-ConfigWindow.ps1 @@ -44,14 +44,6 @@ function Show-ImportExportConfigWindow { $dlg.Owner = $Owner SetWindowThemeResources -window $dlg -usesDarkMode $UsesDarkMode - # Copy the CheckBox default style from the main window so checkboxes get the themed template - try { - $mainCheckBoxStyle = $Owner.FindResource([type][System.Windows.Controls.CheckBox]) - if ($mainCheckBoxStyle) { - $dlg.Resources.Add([type][System.Windows.Controls.CheckBox], $mainCheckBoxStyle) - } - } catch { } - # Populate named elements $dlg.Title = $Title $dlg.FindName('TitleText').Text = $Title @@ -70,6 +62,7 @@ function Show-ImportExportConfigWindow { $cb.Margin = [System.Windows.Thickness]::new(0,0,0,8) $cb.FontSize = 14 $cb.Foreground = $dlg.FindResource('FgColor') + $cb.Style = $window.Resources["AppsPanelCheckBoxStyle"] if ($DisabledCategories -contains $cat) { $cb.IsChecked = $false $cb.IsEnabled = $false