Browse Source

Merge branch 'master' into arc-shape

pull/6133/head
Jumar Macato 5 years ago
committed by GitHub
parent
commit
4074f1ca6b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Avalonia.Controls.DataGrid/DataGrid.cs
  2. 31
      src/Avalonia.Controls/Application.cs
  3. 1
      src/Avalonia.Controls/Menu.cs
  4. 6
      src/Avalonia.Controls/MenuItem.cs
  5. 1
      src/Avalonia.Controls/Repeater/ViewportManager.cs
  6. 1
      src/Avalonia.Controls/Repeater/VirtualizationInfo.cs
  7. 2
      src/Avalonia.Controls/TextBox.cs
  8. 1
      src/Avalonia.X11/TransparencyHelper.cs
  9. 1
      src/Avalonia.X11/X11Window.cs
  10. 1
      src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs
  11. 1
      src/Linux/Avalonia.LinuxFramebuffer/Input/EvDev/EvDevTouchScreen.cs
  12. 1
      src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
  13. 1
      src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs

3
src/Avalonia.Controls.DataGrid/DataGrid.cs

@ -75,7 +75,6 @@ namespace Avalonia.Controls
private const double DATAGRID_defaultMinColumnWidth = 20; private const double DATAGRID_defaultMinColumnWidth = 20;
private const double DATAGRID_defaultMaxColumnWidth = double.PositiveInfinity; private const double DATAGRID_defaultMaxColumnWidth = double.PositiveInfinity;
private List<Exception> _validationErrors;
private List<Exception> _bindingValidationErrors; private List<Exception> _bindingValidationErrors;
private IDisposable _validationSubscription; private IDisposable _validationSubscription;
@ -102,7 +101,6 @@ namespace Avalonia.Controls
private bool _areHandlersSuspended; private bool _areHandlersSuspended;
private bool _autoSizingColumns; private bool _autoSizingColumns;
private IndexToValueTable<bool> _collapsedSlotsTable; private IndexToValueTable<bool> _collapsedSlotsTable;
private DataGridCellCoordinates _currentCellCoordinates;
private Control _clickedElement; private Control _clickedElement;
// used to store the current column during a Reset // used to store the current column during a Reset
@ -141,7 +139,6 @@ namespace Avalonia.Controls
private DataGridSelectedItemsCollection _selectedItems; private DataGridSelectedItemsCollection _selectedItems;
private bool _temporarilyResetCurrentCell; private bool _temporarilyResetCurrentCell;
private object _uneditedValue; // Represents the original current cell value at the time it enters editing mode. private object _uneditedValue; // Represents the original current cell value at the time it enters editing mode.
private ICellEditBinding _currentCellEditBinding;
// An approximation of the sum of the heights in pixels of the scrolling rows preceding // An approximation of the sum of the heights in pixels of the scrolling rows preceding
// the first displayed scrolling row. Since the scrolled off rows are discarded, the grid // the first displayed scrolling row. Since the scrolled off rows are discarded, the grid

31
src/Avalonia.Controls/Application.cs

@ -13,6 +13,7 @@ using Avalonia.Platform;
using Avalonia.Rendering; using Avalonia.Rendering;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.Threading; using Avalonia.Threading;
#nullable enable
namespace Avalonia namespace Avalonia
{ {
@ -35,27 +36,27 @@ namespace Avalonia
/// <summary> /// <summary>
/// The application-global data templates. /// The application-global data templates.
/// </summary> /// </summary>
private DataTemplates _dataTemplates; private DataTemplates? _dataTemplates;
private readonly Lazy<IClipboard> _clipboard = private readonly Lazy<IClipboard> _clipboard =
new Lazy<IClipboard>(() => (IClipboard)AvaloniaLocator.Current.GetService(typeof(IClipboard))); new Lazy<IClipboard>(() => (IClipboard)AvaloniaLocator.Current.GetService(typeof(IClipboard)));
private readonly Styler _styler = new Styler(); private readonly Styler _styler = new Styler();
private Styles _styles; private Styles? _styles;
private IResourceDictionary _resources; private IResourceDictionary? _resources;
private bool _notifyingResourcesChanged; private bool _notifyingResourcesChanged;
private Action<IReadOnlyList<IStyle>> _stylesAdded; private Action<IReadOnlyList<IStyle>>? _stylesAdded;
private Action<IReadOnlyList<IStyle>> _stylesRemoved; private Action<IReadOnlyList<IStyle>>? _stylesRemoved;
/// <summary> /// <summary>
/// Defines the <see cref="DataContext"/> property. /// Defines the <see cref="DataContext"/> property.
/// </summary> /// </summary>
public static readonly StyledProperty<object> DataContextProperty = public static readonly StyledProperty<object?> DataContextProperty =
StyledElement.DataContextProperty.AddOwner<Application>(); StyledElement.DataContextProperty.AddOwner<Application>();
/// <inheritdoc/> /// <inheritdoc/>
public event EventHandler<ResourcesChangedEventArgs> ResourcesChanged; public event EventHandler<ResourcesChangedEventArgs>? ResourcesChanged;
public event EventHandler<UrlOpenedEventArgs> UrlsOpened; public event EventHandler<UrlOpenedEventArgs>? UrlsOpened;
/// <summary> /// <summary>
/// Creates an instance of the <see cref="Application"/> class. /// Creates an instance of the <see cref="Application"/> class.
@ -72,7 +73,7 @@ namespace Avalonia
/// The data context property specifies the default object that will /// The data context property specifies the default object that will
/// be used for data binding. /// be used for data binding.
/// </remarks> /// </remarks>
public object DataContext public object? DataContext
{ {
get { return GetValue(DataContextProperty); } get { return GetValue(DataContextProperty); }
set { SetValue(DataContextProperty, value); } set { SetValue(DataContextProperty, value); }
@ -162,7 +163,7 @@ namespace Avalonia
/// <summary> /// <summary>
/// Gets the styling parent of the application, which is null. /// Gets the styling parent of the application, which is null.
/// </summary> /// </summary>
IStyleHost IStyleHost.StylingParent => null; IStyleHost? IStyleHost.StylingParent => null;
/// <inheritdoc/> /// <inheritdoc/>
bool IStyleHost.IsStylesInitialized => _styles != null; bool IStyleHost.IsStylesInitialized => _styles != null;
@ -194,7 +195,7 @@ namespace Avalonia
public virtual void Initialize() { } public virtual void Initialize() { }
/// <inheritdoc/> /// <inheritdoc/>
bool IResourceNode.TryGetResource(object key, out object value) bool IResourceNode.TryGetResource(object key, out object? value)
{ {
value = null; value = null;
return (_resources?.TryGetResource(key, out value) ?? false) || return (_resources?.TryGetResource(key, out value) ?? false) ||
@ -279,17 +280,17 @@ namespace Avalonia
NotifyResourcesChanged(e); NotifyResourcesChanged(e);
} }
private string _name; private string? _name;
/// <summary> /// <summary>
/// Defines Name property /// Defines Name property
/// </summary> /// </summary>
public static readonly DirectProperty<Application, string> NameProperty = public static readonly DirectProperty<Application, string?> NameProperty =
AvaloniaProperty.RegisterDirect<Application, string>("Name", o => o.Name, (o, v) => o.Name = v); AvaloniaProperty.RegisterDirect<Application, string?>("Name", o => o.Name, (o, v) => o.Name = v);
/// <summary> /// <summary>
/// Application name to be used for various platform-specific purposes /// Application name to be used for various platform-specific purposes
/// </summary> /// </summary>
public string Name public string? Name
{ {
get => _name; get => _name;
set => SetAndRaise(NameProperty, ref _name, value); set => SetAndRaise(NameProperty, ref _name, value);

1
src/Avalonia.Controls/Menu.cs

@ -17,7 +17,6 @@ namespace Avalonia.Controls
private static readonly ITemplate<IPanel> DefaultPanel = private static readonly ITemplate<IPanel> DefaultPanel =
new FuncTemplate<IPanel>(() => new StackPanel { Orientation = Orientation.Horizontal }); new FuncTemplate<IPanel>(() => new StackPanel { Orientation = Orientation.Horizontal });
private LightDismissOverlayLayer? _overlay;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Menu"/> class. /// Initializes a new instance of the <see cref="Menu"/> class.

6
src/Avalonia.Controls/MenuItem.cs

@ -36,7 +36,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Defines the <see cref="HotKey"/> property. /// Defines the <see cref="HotKey"/> property.
/// </summary> /// </summary>
public static readonly StyledProperty<KeyGesture> HotKeyProperty = public static readonly StyledProperty<KeyGesture?> HotKeyProperty =
HotKeyManager.HotKeyProperty.AddOwner<MenuItem>(); HotKeyManager.HotKeyProperty.AddOwner<MenuItem>();
/// <summary> /// <summary>
@ -108,7 +108,7 @@ namespace Avalonia.Controls
private ICommand? _command; private ICommand? _command;
private bool _commandCanExecute = true; private bool _commandCanExecute = true;
private Popup? _popup; private Popup? _popup;
private KeyGesture _hotkey; private KeyGesture? _hotkey;
private bool _isEmbeddedInMenu; private bool _isEmbeddedInMenu;
/// <summary> /// <summary>
@ -214,7 +214,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Gets or sets an <see cref="KeyGesture"/> associated with this control /// Gets or sets an <see cref="KeyGesture"/> associated with this control
/// </summary> /// </summary>
public KeyGesture HotKey public KeyGesture? HotKey
{ {
get { return GetValue(HotKeyProperty); } get { return GetValue(HotKeyProperty); }
set { SetValue(HotKeyProperty, value); } set { SetValue(HotKeyProperty, value); }

1
src/Avalonia.Controls/Repeater/ViewportManager.cs

@ -27,7 +27,6 @@ namespace Avalonia.Controls
private IScrollAnchorProvider _scroller; private IScrollAnchorProvider _scroller;
private IControl _makeAnchorElement; private IControl _makeAnchorElement;
private bool _isAnchorOutsideRealizedRange; private bool _isAnchorOutsideRealizedRange;
private Task _cacheBuildAction;
private Rect _visibleWindow; private Rect _visibleWindow;
private Rect _layoutExtent; private Rect _layoutExtent;
// This is the expected shift by the layout. // This is the expected shift by the layout.

1
src/Avalonia.Controls/Repeater/VirtualizationInfo.cs

@ -27,7 +27,6 @@ namespace Avalonia.Controls
internal class VirtualizationInfo internal class VirtualizationInfo
{ {
private int _pinCounter; private int _pinCounter;
private object _data;
public Rect ArrangeBounds { get; set; } public Rect ArrangeBounds { get; set; }
public bool AutoRecycleCandidate { get; set; } public bool AutoRecycleCandidate { get; set; }

2
src/Avalonia.Controls/TextBox.cs

@ -1290,7 +1290,7 @@ namespace Avalonia.Controls
private void UpdatePseudoclasses() private void UpdatePseudoclasses()
{ {
PseudoClasses.Set(":empty", string.IsNullOrWhiteSpace(Text)); PseudoClasses.Set(":empty", string.IsNullOrEmpty(Text));
} }
private bool IsPasswordBox => PasswordChar != default(char); private bool IsPasswordBox => PasswordChar != default(char);

1
src/Avalonia.X11/TransparencyHelper.cs

@ -10,7 +10,6 @@ namespace Avalonia.X11
private readonly X11Globals _globals; private readonly X11Globals _globals;
private WindowTransparencyLevel _currentLevel; private WindowTransparencyLevel _currentLevel;
private WindowTransparencyLevel _requestedLevel; private WindowTransparencyLevel _requestedLevel;
private bool _isCompositing;
private bool _blurAtomsAreSet; private bool _blurAtomsAreSet;
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; } public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }

1
src/Avalonia.X11/X11Window.cs

@ -30,7 +30,6 @@ namespace Avalonia.X11
ITopLevelImplWithTextInputMethod ITopLevelImplWithTextInputMethod
{ {
private readonly AvaloniaX11Platform _platform; private readonly AvaloniaX11Platform _platform;
private readonly IWindowImpl _popupParent;
private readonly bool _popup; private readonly bool _popup;
private readonly X11Info _x11; private readonly X11Info _x11;
private XConfigureEvent? _configure; private XConfigureEvent? _configure;

1
src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

@ -15,7 +15,6 @@ namespace Avalonia.LinuxFramebuffer
private readonly IOutputBackend _outputBackend; private readonly IOutputBackend _outputBackend;
private readonly IInputBackend _inputBackend; private readonly IInputBackend _inputBackend;
private bool _renderQueued;
public IInputRoot InputRoot { get; private set; } public IInputRoot InputRoot { get; private set; }
public FramebufferToplevelImpl(IOutputBackend outputBackend, IInputBackend inputBackend) public FramebufferToplevelImpl(IOutputBackend outputBackend, IInputBackend inputBackend)

1
src/Linux/Avalonia.LinuxFramebuffer/Input/EvDev/EvDevTouchScreen.cs

@ -7,7 +7,6 @@ namespace Avalonia.LinuxFramebuffer.Input.EvDev
internal class EvDevSingleTouchScreen : EvDevDeviceHandler internal class EvDevSingleTouchScreen : EvDevDeviceHandler
{ {
private readonly IScreenInfoProvider _screenInfo; private readonly IScreenInfoProvider _screenInfo;
private readonly int _width, _height;
private readonly Matrix _calibration; private readonly Matrix _calibration;
private input_absinfo _axisX; private input_absinfo _axisX;
private input_absinfo _axisY; private input_absinfo _axisY;

1
src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs

@ -16,7 +16,6 @@ namespace Avalonia.LinuxFramebuffer.Output
public unsafe class DrmOutput : IGlOutputBackend, IGlPlatformSurface public unsafe class DrmOutput : IGlOutputBackend, IGlPlatformSurface
{ {
private DrmCard _card; private DrmCard _card;
private readonly EglGlPlatformSurface _eglPlatformSurface;
public PixelSize PixelSize => _mode.Resolution; public PixelSize PixelSize => _mode.Resolution;
public double Scaling { get; set; } public double Scaling { get; set; }
public IGlContext PrimaryContext => _deferredContext; public IGlContext PrimaryContext => _deferredContext;

1
src/Windows/Avalonia.Win32/WinRT/Composition/WinUICompositorConnection.cs

@ -17,7 +17,6 @@ namespace Avalonia.Win32.WinRT.Composition
class WinUICompositorConnection : IRenderTimer class WinUICompositorConnection : IRenderTimer
{ {
private readonly EglContext _syncContext; private readonly EglContext _syncContext;
private IntPtr _queue;
private ICompositor _compositor; private ICompositor _compositor;
private ICompositor2 _compositor2; private ICompositor2 _compositor2;
private ICompositor5 _compositor5; private ICompositor5 _compositor5;

Loading…
Cancel
Save