Browse Source
Merge branch 'master' into fix-repeatbutton-focus
pull/6763/head
Tako
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
16 additions and
1 deletions
-
src/Avalonia.Controls/Border.cs
-
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
-
src/Avalonia.Controls/Primitives/Popup.cs
-
src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
-
src/Avalonia.Controls/ProgressBar.cs
-
src/Avalonia.Controls/Remote/RemoteWidget.cs
-
src/Avalonia.Controls/TextBox.cs
|
|
|
@ -8,7 +8,9 @@ namespace Avalonia.Controls |
|
|
|
/// <summary>
|
|
|
|
/// A control which decorates a child with a border and background.
|
|
|
|
/// </summary>
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
public partial class Border : Decorator, IVisualWithRoundRectClip |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="Background"/> property.
|
|
|
|
|
|
|
|
@ -332,7 +332,9 @@ namespace Avalonia.Controls |
|
|
|
/// </summary>
|
|
|
|
static NumericUpDown() |
|
|
|
{ |
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
CultureInfoProperty.Changed.Subscribe(OnCultureInfoChanged); |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
NumberFormatProperty.Changed.Subscribe(OnNumberFormatChanged); |
|
|
|
FormatStringProperty.Changed.Subscribe(FormatStringChanged); |
|
|
|
IncrementProperty.Changed.Subscribe(IncrementChanged); |
|
|
|
|
|
|
|
@ -20,7 +20,9 @@ namespace Avalonia.Controls.Primitives |
|
|
|
/// <summary>
|
|
|
|
/// Displays a popup window.
|
|
|
|
/// </summary>
|
|
|
|
#pragma warning disable CS0612 // Type or member is obsolete
|
|
|
|
public class Popup : Control, IVisualTreeHost, IPopupHostProvider |
|
|
|
#pragma warning restore CS0612 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty = |
|
|
|
AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false); |
|
|
|
|
|
|
|
@ -447,8 +447,10 @@ namespace Avalonia.Controls.Primitives.PopupPositioning |
|
|
|
PopupPositionerConstraintAdjustment constraintAdjustment, Rect? rect) |
|
|
|
{ |
|
|
|
// We need a better way for tracking the last pointer position
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
var pointer = topLevel.PointToClient(topLevel.PlatformImpl.MouseDevice.Position); |
|
|
|
|
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
|
|
|
|
positionerParameters.Offset = offset; |
|
|
|
positionerParameters.ConstraintAdjustment = constraintAdjustment; |
|
|
|
if (placement == PlacementMode.Pointer) |
|
|
|
|
|
|
|
@ -218,9 +218,12 @@ namespace Avalonia.Controls |
|
|
|
TemplateProperties.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150%
|
|
|
|
TemplateProperties.Container2AnimationEndPosition = barIndicatorWidth2 * 1.66; // Position at 166%
|
|
|
|
|
|
|
|
|
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
// Remove these properties when we switch to fluent as default and removed the old one.
|
|
|
|
IndeterminateStartingOffset = -dim; |
|
|
|
IndeterminateEndingOffset = dim; |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
|
|
|
|
var padding = Padding; |
|
|
|
var rectangle = new RectangleGeometry( |
|
|
|
|
|
|
|
@ -77,8 +77,10 @@ namespace Avalonia.Controls.Remote |
|
|
|
_bitmap.PixelSize.Height != _lastFrame.Height) |
|
|
|
{ |
|
|
|
_bitmap?.Dispose(); |
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
_bitmap = new WriteableBitmap(new PixelSize(_lastFrame.Width, _lastFrame.Height), |
|
|
|
new Vector(96, 96), fmt); |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
} |
|
|
|
using (var l = _bitmap.Lock()) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -991,7 +991,9 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
var point = e.GetPosition(_presenter); |
|
|
|
var index = CaretIndex = _presenter.GetCaretIndex(point); |
|
|
|
#pragma warning disable CS0618 // Type or member is obsolete
|
|
|
|
switch (e.ClickCount) |
|
|
|
#pragma warning restore CS0618 // Type or member is obsolete
|
|
|
|
{ |
|
|
|
case 1: |
|
|
|
SelectionStart = SelectionEnd = index; |
|
|
|
|