Browse Source
Merge branch 'master' into rxui-events
pull/4535/head
Artyom V. Gorchakov
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
9 additions and
9 deletions
-
src/Avalonia.Controls.DataGrid/DataGridColumnHeader.cs
-
src/Avalonia.Controls.DataGrid/DataGridRow.cs
-
src/Avalonia.Controls.DataGrid/DataGridRowHeader.cs
-
src/Avalonia.Controls/TextBox.cs
-
src/Avalonia.Themes.Default/Expander.xaml
-
src/Avalonia.Themes.Fluent/Expander.xaml
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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}" |
|
|
|
|
|
|
|
@ -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" /> |
|
|
|
|