Browse Source

Merge branch 'master' into feature/embedded-automation-roots

pull/12330/head
Steven Kirk 3 years ago
parent
commit
40a35491f3
  1. 8
      native/Avalonia.Native/src/OSX/WindowBaseImpl.mm
  2. 26
      src/Avalonia.Base/Animation/CrossFade.cs
  3. 5
      src/Avalonia.Controls.DataGrid/DataGridRows.cs
  4. 15
      src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
  5. 12
      src/Avalonia.FreeDesktop/DBusIme/DBusTextInputMethodBase.cs
  6. 1
      src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml
  7. 1
      src/Avalonia.Themes.Simple/Controls/NumericUpDown.xaml

8
native/Avalonia.Native/src/OSX/WindowBaseImpl.mm

@ -151,6 +151,14 @@ HRESULT WindowBaseImpl::Hide() {
@autoreleasepool {
if (Window != nullptr) {
auto frame = [Window frame];
AvnPoint point;
point.X = frame.origin.x;
point.Y = frame.origin.y + frame.size.height;
lastPositionSet = ConvertPointY(point);
hasPosition = true;
[Window orderOut:Window];
}

26
src/Avalonia.Base/Animation/CrossFade.cs

@ -35,6 +35,18 @@ namespace Avalonia.Animation
{
Children =
{
new KeyFrame()
{
Setters =
{
new Setter
{
Property = Visual.OpacityProperty,
Value = 1d
}
},
Cue = new Cue(0d)
},
new KeyFrame()
{
Setters =
@ -54,6 +66,18 @@ namespace Avalonia.Animation
{
Children =
{
new KeyFrame()
{
Setters =
{
new Setter
{
Property = Visual.OpacityProperty,
Value = 0d
}
},
Cue = new Cue(0d)
},
new KeyFrame()
{
Setters =
@ -117,11 +141,13 @@ namespace Avalonia.Animation
if (from != null)
{
from.Opacity = 0f;
tasks.Add(_fadeOutAnimation.RunAsync(from, null, cancellationToken));
}
if (to != null)
{
to.Opacity = 1f;
to.IsVisible = true;
tasks.Add(_fadeInAnimation.RunAsync(to, null, cancellationToken));
}

5
src/Avalonia.Controls.DataGrid/DataGridRows.cs

@ -2969,11 +2969,8 @@ namespace Avalonia.Controls
var detailsContent = RowDetailsTemplate.Build(dataItem);
if (detailsContent != null)
{
detailsContent.DataContext = dataItem;
_rowsPresenter.Children.Add(detailsContent);
if (dataItem != null)
{
detailsContent.DataContext = dataItem;
}
detailsContent.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
RowDetailsHeightEstimate = detailsContent.DesiredSize.Height;
_rowsPresenter.Children.Remove(detailsContent);

15
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs

@ -126,6 +126,12 @@ namespace Avalonia.Controls
public static readonly StyledProperty<VerticalAlignment> VerticalContentAlignmentProperty =
ContentControl.VerticalContentAlignmentProperty.AddOwner<NumericUpDown>();
/// <summary>
/// Defines the <see cref="TextAlignment"/> property
/// </summary>
public static readonly StyledProperty<Media.TextAlignment> TextAlignmentProperty =
TextBox.TextAlignmentProperty.AddOwner<NumericUpDown>();
private IDisposable? _textBoxTextChangedSubscription;
private bool _internalValueSet;
@ -299,6 +305,15 @@ namespace Avalonia.Controls
set => SetValue(VerticalContentAlignmentProperty, value);
}
/// <summary>
/// Gets or sets the <see cref="Media.TextAlignment"/> of the <see cref="NumericUpDown"/>
/// </summary>
public Media.TextAlignment TextAlignment
{
get => GetValue(TextAlignmentProperty);
set => SetValue(TextAlignmentProperty, value);
}
/// <summary>
/// Initializes new instance of <see cref="NumericUpDown"/> class.
/// </summary>

12
src/Avalonia.FreeDesktop/DBusIme/DBusTextInputMethodBase.cs

@ -62,9 +62,15 @@ namespace Avalonia.FreeDesktop.DBusIme
foreach (var name in _knownNames)
{
var dbus = new OrgFreedesktopDBus(Connection, "org.freedesktop.DBus", "/org/freedesktop/DBus");
_disposables.Add(await dbus.WatchNameOwnerChangedAsync(OnNameChange));
var nameOwner = await dbus.GetNameOwnerAsync(name);
OnNameChange(null, (name, null, nameOwner));
try
{
_disposables.Add(await dbus.WatchNameOwnerChangedAsync(OnNameChange));
var nameOwner = await dbus.GetNameOwnerAsync(name);
OnNameChange(null, (name, null, nameOwner));
}
catch (DBusException)
{
}
}
}

1
src/Avalonia.Themes.Fluent/Controls/NumericUpDown.xaml

@ -57,6 +57,7 @@
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Text="{TemplateBinding Text}"
TextAlignment="{TemplateBinding TextAlignment}"
AcceptsReturn="False"
TextWrapping="NoWrap" />
</ButtonSpinner>

1
src/Avalonia.Themes.Simple/Controls/NumericUpDown.xaml

@ -31,6 +31,7 @@
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
IsReadOnly="{TemplateBinding IsReadOnly}"
Text="{TemplateBinding Text}"
TextAlignment="{TemplateBinding TextAlignment}"
TextWrapping="NoWrap"
Watermark="{TemplateBinding Watermark}" />
</ButtonSpinner>

Loading…
Cancel
Save