Browse Source
Fix #13249 Mouse cursor on TextBox scrollbars shows as caret (#13542)
* Add styles to scrollviewers
* pr comment fix
* remove styles from scrollviewer
* add styles to scrollviewers
* add Ibeam to floating watermark
---------
Co-authored-by: Robert Mutniański <robert.mutnianski@inetum.com>
pull/13673/head
Robert Mutniański
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
20 additions and
4 deletions
-
src/Avalonia.Themes.Fluent/Controls/ScrollViewer.xaml
-
src/Avalonia.Themes.Fluent/Controls/TextBox.xaml
-
src/Avalonia.Themes.Simple/Controls/ScrollViewer.xaml
-
src/Avalonia.Themes.Simple/Controls/TextBox.xaml
|
|
|
@ -44,10 +44,10 @@ |
|
|
|
</ScrollContentPresenter> |
|
|
|
<ScrollBar Name="PART_HorizontalScrollBar" |
|
|
|
Orientation="Horizontal" |
|
|
|
Grid.Row="1" /> |
|
|
|
Grid.Row="1"/> |
|
|
|
<ScrollBar Name="PART_VerticalScrollBar" |
|
|
|
Orientation="Vertical" |
|
|
|
Grid.Column="1" /> |
|
|
|
Grid.Column="1"/> |
|
|
|
<Panel x:Name="PART_ScrollBarsSeparator" |
|
|
|
Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
|
|
|
|
@ -131,7 +131,6 @@ |
|
|
|
<DockPanel x:Name="PART_InnerDockPanel" |
|
|
|
Grid.Column="1" |
|
|
|
Grid.ColumnSpan="1" |
|
|
|
Cursor="IBeam" |
|
|
|
Margin="{TemplateBinding Padding}"> |
|
|
|
<TextBlock Name="PART_FloatingWatermark" |
|
|
|
Foreground="{DynamicResource SystemAccentColor}" |
|
|
|
@ -171,6 +170,11 @@ |
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> |
|
|
|
</Panel> |
|
|
|
<ScrollViewer.Styles> |
|
|
|
<Style Selector="ScrollContentPresenter#PART_ContentPresenter"> |
|
|
|
<Setter Property="Cursor" Value="IBeam" /> |
|
|
|
</Style> |
|
|
|
</ScrollViewer.Styles> |
|
|
|
</ScrollViewer> |
|
|
|
</DockPanel> |
|
|
|
<ContentPresenter Grid.Column="2" Grid.ColumnSpan="1" Content="{TemplateBinding InnerRightContent}"/> |
|
|
|
@ -228,6 +232,10 @@ |
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlErrorTextForegroundBrush}"/> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^ /template/ TextBlock#PART_FloatingWatermark"> |
|
|
|
<Setter Property="Cursor" Value="IBeam"/> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^[UseFloatingWatermark=true]:not(:empty) /template/ TextBlock#PART_FloatingWatermark"> |
|
|
|
<Setter Property="IsVisible" Value="True" /> |
|
|
|
</Style> |
|
|
|
|
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
Orientation="Vertical"/> |
|
|
|
<Panel Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
Background="{DynamicResource ThemeControlMidBrush}" /> |
|
|
|
Background="{DynamicResource ThemeControlMidBrush}"/> |
|
|
|
</Grid> |
|
|
|
</ControlTemplate> |
|
|
|
</Setter> |
|
|
|
|
|
|
|
@ -157,6 +157,11 @@ |
|
|
|
TextAlignment="{TemplateBinding TextAlignment}" |
|
|
|
TextWrapping="{TemplateBinding TextWrapping}" /> |
|
|
|
</Panel> |
|
|
|
<ScrollViewer.Styles> |
|
|
|
<Style Selector="ScrollContentPresenter#PART_ContentPresenter"> |
|
|
|
<Setter Property="Cursor" Value="IBeam" /> |
|
|
|
</Style> |
|
|
|
</ScrollViewer.Styles> |
|
|
|
</ScrollViewer> |
|
|
|
<ContentPresenter Grid.Column="2" |
|
|
|
Grid.ColumnSpan="1" |
|
|
|
@ -183,6 +188,9 @@ |
|
|
|
<Style Selector="^:disabled /template/ Border#border"> |
|
|
|
<Setter Property="Opacity" Value="{DynamicResource ThemeDisabledOpacity}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^ /template/ TextBlock#floatingWatermark"> |
|
|
|
<Setter Property="Cursor" Value="IBeam"/> |
|
|
|
</Style> |
|
|
|
|
|
|
|
<Style Selector="^.clearButton[AcceptsReturn=False][IsReadOnly=False]:focus:not(TextBox:empty)"> |
|
|
|
<Setter Property="InnerRightContent"> |
|
|
|
|