Browse Source

Merge branch 'master' into scrollbar-delinq

pull/3676/head
Dariusz Komosiński 7 years ago
committed by GitHub
parent
commit
8ff98c7d04
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Avalonia.Controls/TextBox.cs
  2. 2
      src/Avalonia.Themes.Default/TextBox.xaml
  3. 3
      src/Avalonia.Themes.Default/TreeViewItem.xaml

3
src/Avalonia.Controls/TextBox.cs

@ -701,7 +701,8 @@ namespace Avalonia.Controls
{
var text = Text;
if (text != null && e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
var clickInfo = e.GetCurrentPoint(this);
if (text != null && clickInfo.Properties.IsLeftButtonPressed && !(clickInfo.Pointer?.Captured is Border))
{
var point = e.GetPosition(_presenter);
var index = CaretIndex = _presenter.GetCaretIndex(point);

2
src/Avalonia.Themes.Default/TextBox.xaml

@ -69,7 +69,7 @@
<Style Selector="TextBox:error /template/ Border#border">
<Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}"/>
</Style>
<Style Selector="TextBox">
<Style Selector="TextBox /template/ DockPanel">
<Setter Property="Cursor" Value="IBeam" />
</Style>
<Style Selector="TextBox:disabled /template/ Border#border">

3
src/Avalonia.Themes.Default/TreeViewItem.xaml

@ -17,8 +17,7 @@
BorderThickness="{TemplateBinding BorderThickness}"
TemplatedControl.IsTemplateFocusTarget="True">
<Grid Name="PART_Header"
ColumnDefinitions="16, Auto"
HorizontalAlignment="Left"
ColumnDefinitions="16, *"
Margin="{TemplateBinding Level, Mode=OneWay, Converter={StaticResource LeftMarginConverter}}" >
<ToggleButton Name="expander"
Focusable="False"

Loading…
Cancel
Save