Browse Source

Merge branch 'master' into rxui-events

pull/4535/head
Artyom V. Gorchakov 6 years ago
committed by GitHub
parent
commit
f998e0d6f5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
  2. 2
      src/Avalonia.Controls.DataGrid/DataGridRow.cs
  3. 2
      src/Avalonia.Controls.DataGrid/DataGridRowHeader.cs
  4. 6
      src/Avalonia.Controls/TextBox.cs
  5. 2
      src/Avalonia.Themes.Default/Expander.xaml
  6. 4
      src/Avalonia.Themes.Fluent/Expander.xaml

2
src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs

@ -457,7 +457,7 @@ namespace Avalonia.Controls
private void DataGridColumnHeader_PointerPressed(object sender, PointerPressedEventArgs e) private void DataGridColumnHeader_PointerPressed(object sender, PointerPressedEventArgs e)
{ {
if (OwningColumn == null || e.Handled || !IsEnabled || e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) if (OwningColumn == null || e.Handled || !IsEnabled || !e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{ {
return; return;
} }

2
src/Avalonia.Controls.DataGrid/DataGridRow.cs

@ -789,7 +789,7 @@ namespace Avalonia.Controls
private void DataGridRow_PointerPressed(PointerPressedEventArgs e) private void DataGridRow_PointerPressed(PointerPressedEventArgs e)
{ {
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{ {
return; return;
} }

2
src/Avalonia.Controls.DataGrid/DataGridRowHeader.cs

@ -162,7 +162,7 @@ namespace Avalonia.Controls.Primitives
//TODO TabStop //TODO TabStop
private void DataGridRowHeader_PointerPressed(object sender, PointerPressedEventArgs e) private void DataGridRowHeader_PointerPressed(object sender, PointerPressedEventArgs e)
{ {
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{ {
return; return;
} }

6
src/Avalonia.Controls/TextBox.cs

@ -456,9 +456,9 @@ namespace Avalonia.Controls
private void UpdateCommandStates() private void UpdateCommandStates()
{ {
var text = GetSelection(); var text = GetSelection();
var isNullOrEmpty = string.IsNullOrEmpty(text); var isSelectionNullOrEmpty = string.IsNullOrEmpty(text);
CanCopy = !isNullOrEmpty; CanCopy = !IsPasswordBox && !isSelectionNullOrEmpty;
CanCut = !isNullOrEmpty && !IsReadOnly; CanCut = !IsPasswordBox && !isSelectionNullOrEmpty && !IsReadOnly;
CanPaste = !IsReadOnly; CanPaste = !IsReadOnly;
} }

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

@ -86,7 +86,7 @@
<Style Selector="Expander /template/ ToggleButton#PART_toggle"> <Style Selector="Expander /template/ ToggleButton#PART_toggle">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border BorderThickness="1"> <Border BorderThickness="1" Background="Transparent">
<Grid ColumnDefinitions="Auto,Auto"> <Grid ColumnDefinitions="Auto,Auto">
<Border Grid.Column="0" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center"> <Border Grid.Column="0" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Fill="{DynamicResource ThemeForegroundBrush}" <Path Fill="{DynamicResource ThemeForegroundBrush}"

4
src/Avalonia.Themes.Fluent/Expander.xaml

@ -86,10 +86,10 @@
<Style Selector="Expander /template/ ToggleButton#PART_toggle"> <Style Selector="Expander /template/ ToggleButton#PART_toggle">
<Setter Property="Template"> <Setter Property="Template">
<ControlTemplate> <ControlTemplate>
<Border BorderThickness="1"> <Border BorderThickness="1" Background="Transparent">
<Grid ColumnDefinitions="Auto,Auto"> <Grid ColumnDefinitions="Auto,Auto">
<Border Grid.Column="0" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center"> <Border Grid.Column="0" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center">
<Path Fill="{DynamicResource SystemControlForegroundAltMediumHighBrush}" <Path Fill="{DynamicResource SystemControlForegroundBaseHighBrush}"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
Data="M 0 2 L 4 6 L 0 10 Z" /> Data="M 0 2 L 4 6 L 0 10 Z" />

Loading…
Cancel
Save