From 9a3ed2e0228c5d12c773de632805bbf6f944df50 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sun, 14 May 2023 01:51:44 -0400 Subject: [PATCH] Use correct theme specific selection brush on SelectableTextBlock --- samples/ControlCatalog/Pages/TextBlockPage.xaml | 2 +- src/Avalonia.Controls/SelectableTextBlock.cs | 2 +- src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml | 2 ++ src/Avalonia.Themes.Simple/Controls/SelectableTextBlock.xaml | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/samples/ControlCatalog/Pages/TextBlockPage.xaml b/samples/ControlCatalog/Pages/TextBlockPage.xaml index 6511e2136a..70f83f6799 100644 --- a/samples/ControlCatalog/Pages/TextBlockPage.xaml +++ b/samples/ControlCatalog/Pages/TextBlockPage.xaml @@ -118,7 +118,7 @@ - + This is a TextBlock with several diff --git a/src/Avalonia.Controls/SelectableTextBlock.cs b/src/Avalonia.Controls/SelectableTextBlock.cs index 5d14611a62..830c0a671d 100644 --- a/src/Avalonia.Controls/SelectableTextBlock.cs +++ b/src/Avalonia.Controls/SelectableTextBlock.cs @@ -30,7 +30,7 @@ namespace Avalonia.Controls o => o.SelectedText); public static readonly StyledProperty SelectionBrushProperty = - TextBox.SelectionBrushProperty.AddOwner(new(new Data.Optional(Brushes.Blue))); + TextBox.SelectionBrushProperty.AddOwner(); public static readonly DirectProperty CanCopyProperty = TextBox.CanCopyProperty.AddOwner(o => o.CanCopy); diff --git a/src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml b/src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml index f630969ae6..2556f80ef6 100644 --- a/src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml +++ b/src/Avalonia.Themes.Fluent/Controls/SelectableTextBlock.xaml @@ -10,6 +10,8 @@ + +