Browse Source

Merge branch 'master' into fixes/Some_Null_Annotation_And_Warning

pull/6754/head
Giuseppe Lippolis 5 years ago
parent
commit
c1c5289b87
  1. 2
      src/Avalonia.Controls/Border.cs
  2. 2
      src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
  3. 2
      src/Avalonia.Controls/Primitives/Popup.cs
  4. 4
      src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs
  5. 3
      src/Avalonia.Controls/ProgressBar.cs
  6. 2
      src/Avalonia.Controls/Remote/RemoteWidget.cs
  7. 2
      src/Avalonia.Controls/TextBox.cs

2
src/Avalonia.Controls/Border.cs

@ -8,7 +8,9 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// A control which decorates a child with a border and background. /// A control which decorates a child with a border and background.
/// </summary> /// </summary>
#pragma warning disable CS0618 // Type or member is obsolete
public partial class Border : Decorator, IVisualWithRoundRectClip public partial class Border : Decorator, IVisualWithRoundRectClip
#pragma warning restore CS0618 // Type or member is obsolete
{ {
/// <summary> /// <summary>
/// Defines the <see cref="Background"/> property. /// Defines the <see cref="Background"/> property.

2
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs

@ -332,7 +332,9 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
static NumericUpDown() static NumericUpDown()
{ {
#pragma warning disable CS0612 // Type or member is obsolete
CultureInfoProperty.Changed.Subscribe(OnCultureInfoChanged); CultureInfoProperty.Changed.Subscribe(OnCultureInfoChanged);
#pragma warning restore CS0612 // Type or member is obsolete
NumberFormatProperty.Changed.Subscribe(OnNumberFormatChanged); NumberFormatProperty.Changed.Subscribe(OnNumberFormatChanged);
FormatStringProperty.Changed.Subscribe(FormatStringChanged); FormatStringProperty.Changed.Subscribe(FormatStringChanged);
IncrementProperty.Changed.Subscribe(IncrementChanged); IncrementProperty.Changed.Subscribe(IncrementChanged);

2
src/Avalonia.Controls/Primitives/Popup.cs

@ -20,7 +20,9 @@ namespace Avalonia.Controls.Primitives
/// <summary> /// <summary>
/// Displays a popup window. /// Displays a popup window.
/// </summary> /// </summary>
#pragma warning disable CS0612 // Type or member is obsolete
public class Popup : Control, IVisualTreeHost, IPopupHostProvider public class Popup : Control, IVisualTreeHost, IPopupHostProvider
#pragma warning restore CS0612 // Type or member is obsolete
{ {
public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty = public static readonly StyledProperty<bool> WindowManagerAddShadowHintProperty =
AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false); AvaloniaProperty.Register<PopupRoot, bool>(nameof(WindowManagerAddShadowHint), false);

4
src/Avalonia.Controls/Primitives/PopupPositioning/IPopupPositioner.cs

@ -447,8 +447,10 @@ namespace Avalonia.Controls.Primitives.PopupPositioning
PopupPositionerConstraintAdjustment constraintAdjustment, Rect? rect) PopupPositionerConstraintAdjustment constraintAdjustment, Rect? rect)
{ {
// We need a better way for tracking the last pointer position // 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); var pointer = topLevel.PointToClient(topLevel.PlatformImpl.MouseDevice.Position);
#pragma warning restore CS0618 // Type or member is obsolete
positionerParameters.Offset = offset; positionerParameters.Offset = offset;
positionerParameters.ConstraintAdjustment = constraintAdjustment; positionerParameters.ConstraintAdjustment = constraintAdjustment;
if (placement == PlacementMode.Pointer) if (placement == PlacementMode.Pointer)

3
src/Avalonia.Controls/ProgressBar.cs

@ -218,9 +218,12 @@ namespace Avalonia.Controls
TemplateProperties.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150% TemplateProperties.Container2AnimationStartPosition = barIndicatorWidth2 * -1.5; // Position at -150%
TemplateProperties.Container2AnimationEndPosition = barIndicatorWidth2 * 1.66; // Position at 166% 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. // Remove these properties when we switch to fluent as default and removed the old one.
IndeterminateStartingOffset = -dim; IndeterminateStartingOffset = -dim;
IndeterminateEndingOffset = dim; IndeterminateEndingOffset = dim;
#pragma warning restore CS0618 // Type or member is obsolete
var padding = Padding; var padding = Padding;
var rectangle = new RectangleGeometry( var rectangle = new RectangleGeometry(

2
src/Avalonia.Controls/Remote/RemoteWidget.cs

@ -77,8 +77,10 @@ namespace Avalonia.Controls.Remote
_bitmap.PixelSize.Height != _lastFrame.Height) _bitmap.PixelSize.Height != _lastFrame.Height)
{ {
_bitmap?.Dispose(); _bitmap?.Dispose();
#pragma warning disable CS0618 // Type or member is obsolete
_bitmap = new WriteableBitmap(new PixelSize(_lastFrame.Width, _lastFrame.Height), _bitmap = new WriteableBitmap(new PixelSize(_lastFrame.Width, _lastFrame.Height),
new Vector(96, 96), fmt); new Vector(96, 96), fmt);
#pragma warning restore CS0618 // Type or member is obsolete
} }
using (var l = _bitmap.Lock()) using (var l = _bitmap.Lock())
{ {

2
src/Avalonia.Controls/TextBox.cs

@ -991,7 +991,9 @@ namespace Avalonia.Controls
{ {
var point = e.GetPosition(_presenter); var point = e.GetPosition(_presenter);
var index = CaretIndex = _presenter.GetCaretIndex(point); var index = CaretIndex = _presenter.GetCaretIndex(point);
#pragma warning disable CS0618 // Type or member is obsolete
switch (e.ClickCount) switch (e.ClickCount)
#pragma warning restore CS0618 // Type or member is obsolete
{ {
case 1: case 1:
SelectionStart = SelectionEnd = index; SelectionStart = SelectionEnd = index;

Loading…
Cancel
Save