Skip to content

Commit 810e11b

Browse files
authored
Improve selected text highlighting (#2938)
* Improve selected text highlighting Signed-off-by: Konctantin <[email protected]> * Format code Signed-off-by: Konctantin <[email protected]> --------- Signed-off-by: Konctantin <[email protected]>
1 parent 1b99486 commit 810e11b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

ILSpy/TextView/DecompilerTextView.xaml

+18-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,28 @@
55
xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
66
xmlns:local="clr-namespace:ICSharpCode.ILSpy.TextView"
77
xmlns:ae="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit"
8+
xmlns:editing="clr-namespace:ICSharpCode.AvalonEdit.Editing;assembly=ICSharpCode.AvalonEdit"
89
xmlns:folding="clr-namespace:ICSharpCode.AvalonEdit.Folding;assembly=ICSharpCode.AvalonEdit"
910
xmlns:styles="urn:TomsToolbox.Wpf.Styles"
1011
xmlns:themes="clr-namespace:ICSharpCode.ILSpy.Themes">
1112
<UserControl.Resources>
1213
<BooleanToVisibilityConverter x:Key="boolToVisibility" />
1314
<SolidColorBrush x:Key="waitAdornerBackgoundBrush" Color="{DynamicResource {x:Static SystemColors.WindowColorKey}}" Opacity=".75"/>
15+
<Style TargetType="{x:Type editing:TextArea}">
16+
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
17+
<Setter Property="SelectionForeground" Value="{x:Null}" />
18+
<Setter Property="SelectionCornerRadius" Value="0.0" />
19+
<Setter Property="SelectionBrush">
20+
<Setter.Value>
21+
<SolidColorBrush Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" Opacity="0.3" />
22+
</Setter.Value>
23+
</Setter>
24+
<Setter Property="SelectionBorder">
25+
<Setter.Value>
26+
<Pen Brush="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Thickness="0" />
27+
</Setter.Value>
28+
</Setter>
29+
</Style>
1430
</UserControl.Resources>
1531
<Grid>
1632
<Border BorderThickness="1,1,0,1" BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}">
@@ -32,7 +48,7 @@
3248
<Setter Property="Template">
3349
<Setter.Value>
3450
<ControlTemplate TargetType="Button">
35-
<Border BorderThickness="1"
51+
<Border BorderThickness="1"
3652
Background="{TemplateBinding Background}"
3753
BorderBrush="{TemplateBinding BorderBrush}"
3854
Padding="{TemplateBinding Padding}">
@@ -64,7 +80,7 @@
6480
Background="{TemplateBinding Background}"
6581
Padding="{TemplateBinding Padding}"
6682
BorderBrush="{TemplateBinding BorderBrush}"
67-
BorderThickness="{TemplateBinding BorderThickness}"
83+
BorderThickness="{TemplateBinding BorderThickness}"
6884
TextOptions.TextFormattingMode="{Binding CurrentZoom, ElementName=PART_ScrollViewer, Converter={x:Static local:ZoomLevelToTextFormattingModeConverter.Instance}}" />
6985
<ControlTemplate.Triggers>
7086
<Trigger Property="WordWrap"

0 commit comments

Comments
 (0)