Browse Source

Merge branch 'master' into fixes/osx-tooltip-crash-on-mainwindow-close

pull/4548/head
Dan Walmsley 6 years ago
parent
commit
92674a7fd2
  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)
{
if (OwningColumn == null || e.Handled || !IsEnabled || e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
if (OwningColumn == null || e.Handled || !IsEnabled || !e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
{
return;
}

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

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

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

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

6
src/Avalonia.Controls/TextBox.cs

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

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

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

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

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

Loading…
Cancel
Save