Browse Source

fix: Address Review

pull/9857/head
Giuseppe Lippolis 3 years ago
parent
commit
8f745ba6fc
  1. 6
      src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatColorPalette.cs
  2. 6
      src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatHalfColorPalette.cs
  3. 6
      src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialColorPalette.cs
  4. 6
      src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialHalfColorPalette.cs
  5. 2
      src/Avalonia.Controls.DataGrid/DataGridCheckBoxColumn.cs
  6. 2
      src/Avalonia.Controls/Diagnostics/ToolTipDiagnostics.cs

6
src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatColorPalette.cs

@ -289,10 +289,8 @@ namespace Avalonia.Controls
};
// See: https://htmlcolorcodes.com/assets/downloads/flat-design-colors/flat-design-color-chart.png
#pragma warning disable CA2211 // Non-constant fields should not be visible
protected static Color[,]? _colorChart = null;
#pragma warning restore CA2211 // Non-constant fields should not be visible
protected static readonly object _colorChartMutex = new();
private static Color[,]? _colorChart = null;
private static readonly object _colorChartMutex = new();
/// <summary>
/// Initializes all color chart colors.

6
src/Avalonia.Controls.ColorPicker/ColorPalettes/FlatHalfColorPalette.cs

@ -10,10 +10,8 @@ namespace Avalonia.Controls
/// <inheritdoc cref="FlatColorPalette"/>
public class FlatHalfColorPalette : IColorPalette
{
#pragma warning disable CA2211 // Non-constant fields should not be visible
protected static Color[,]? _colorChart = null;
#pragma warning restore CA2211 // Non-constant fields should not be visible
protected static readonly object _colorChartMutex = new();
private static Color[,]? _colorChart = null;
private static readonly object _colorChartMutex = new();
/// <summary>
/// Initializes all color chart colors.

6
src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialColorPalette.cs

@ -344,10 +344,8 @@ namespace Avalonia.Controls
// See: https://material.io/design/color/the-color-system.html#tools-for-picking-colors
// This is a reduced palette for uniformity
#pragma warning disable CA2211 // Non-constant fields should not be visible
protected static Color[,]? _colorChart = null;
#pragma warning restore CA2211 // Non-constant fields should not be visible
protected static readonly object _colorChartMutex = new();
private static Color[,]? _colorChart = null;
private static readonly object _colorChartMutex = new();
/// <summary>
/// Initializes all color chart colors.

6
src/Avalonia.Controls.ColorPicker/ColorPalettes/MaterialHalfColorPalette.cs

@ -10,10 +10,8 @@ namespace Avalonia.Controls
/// <inheritdoc cref="MaterialColorPalette"/>
public class MaterialHalfColorPalette : IColorPalette
{
#pragma warning disable CA2211 // Non-constant fields should not be visible
protected static Color[,]? _colorChart = null;
#pragma warning restore CA2211 // Non-constant fields should not be visible
protected static readonly object _colorChartMutex = new();
private static Color[,]? _colorChart = null;
private static readonly object _colorChartMutex = new();
/// <summary>
/// Initializes all color chart colors.

2
src/Avalonia.Controls.DataGrid/DataGridCheckBoxColumn.cs

@ -31,7 +31,7 @@ namespace Avalonia.Controls
/// <summary>
/// Defines the <see cref="IsThreeState"/> property.
/// </summary>
public readonly static StyledProperty<bool> IsThreeStateProperty =
public static readonly StyledProperty<bool> IsThreeStateProperty =
CheckBox.IsThreeStateProperty.AddOwner<DataGridCheckBoxColumn>();
/// <summary>

2
src/Avalonia.Controls/Diagnostics/ToolTipDiagnostics.cs

@ -8,6 +8,6 @@
/// <summary>
/// Provides access to the internal <see cref="ToolTip.ToolTipProperty"/> for use in DevTools.
/// </summary>
public readonly static AvaloniaProperty<ToolTip?> ToolTipProperty = ToolTip.ToolTipProperty;
public static readonly AvaloniaProperty<ToolTip?> ToolTipProperty = ToolTip.ToolTipProperty;
}
}

Loading…
Cancel
Save