From 111a654a67fb556346732e0476a64f91fa149f9d Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 3 Mar 2023 08:28:43 +0100 Subject: [PATCH 1/6] Make buttons theme agnostic --- src/AvaloniaEdit/Search/SearchPanel.xaml | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/AvaloniaEdit/Search/SearchPanel.xaml b/src/AvaloniaEdit/Search/SearchPanel.xaml index 9268959c..7d4ba723 100644 --- a/src/AvaloniaEdit/Search/SearchPanel.xaml +++ b/src/AvaloniaEdit/Search/SearchPanel.xaml @@ -30,8 +30,8 @@ VerticalAlignment="Center" HorizontalAlignment="Center" Height="13" - Fill="{DynamicResource TextControlButtonForeground}" - Stroke="{DynamicResource TextControlButtonForeground}" + Fill="{TemplateBinding Foreground}" + Stroke="{TemplateBinding Foreground}" StrokeThickness="1" /> @@ -113,8 +113,8 @@ HorizontalAlignment="Center" VerticalAlignment="Center" Width="12" - Fill="{DynamicResource ButtonForeground}" - Stroke="{DynamicResource ButtonForeground}" + Fill="{Binding $parent.Foreground}" + Stroke="{Binding $parent.Foreground}" StrokeThickness="1" /> @@ -164,8 +164,8 @@ HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" - Fill="{DynamicResource ButtonForeground}" - Stroke="{DynamicResource ButtonForeground}" + Fill="{Binding $parent.Foreground}" + Stroke="{Binding $parent.Foreground}" StrokeThickness="1" /> @@ -226,7 +226,7 @@ VerticalAlignment="Center" Stretch="Uniform" Width="12" - Fill="{DynamicResource ButtonForeground}" + Fill="{Binding $parent.Foreground}" StrokeThickness="1" /> Date: Fri, 3 Mar 2023 09:45:48 +0100 Subject: [PATCH 2/6] Extract themed properties and create simple and theme variants --- src/AvaloniaEdit/AvaloniaEdit.xaml | 22 +++++++++++++++------- src/AvaloniaEdit/Search/SearchPanel.xaml | 8 ++++---- src/AvaloniaEdit/Themes/Fluent/Base.xaml | 16 ++++++++++++++++ src/AvaloniaEdit/Themes/Simple/Base.xaml | 16 ++++++++++++++++ 4 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 src/AvaloniaEdit/Themes/Fluent/Base.xaml create mode 100644 src/AvaloniaEdit/Themes/Simple/Base.xaml diff --git a/src/AvaloniaEdit/AvaloniaEdit.xaml b/src/AvaloniaEdit/AvaloniaEdit.xaml index 5ab89fb4..0f4c8eaa 100644 --- a/src/AvaloniaEdit/AvaloniaEdit.xaml +++ b/src/AvaloniaEdit/AvaloniaEdit.xaml @@ -1,11 +1,19 @@  - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/AvaloniaEdit/Search/SearchPanel.xaml b/src/AvaloniaEdit/Search/SearchPanel.xaml index 7d4ba723..d4de6ad2 100644 --- a/src/AvaloniaEdit/Search/SearchPanel.xaml +++ b/src/AvaloniaEdit/Search/SearchPanel.xaml @@ -60,12 +60,12 @@