|
|
@ -20,9 +20,10 @@ namespace Avalonia.Controls.Primitives |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// A two dimensional spectrum for color selection.
|
|
|
/// A two dimensional spectrum for color selection.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[PseudoClasses(pcLightSelector)] |
|
|
[PseudoClasses(pcLargeSelector, pcLightSelector)] |
|
|
public partial class ColorSpectrum : TemplatedControl |
|
|
public partial class ColorSpectrum : TemplatedControl |
|
|
{ |
|
|
{ |
|
|
|
|
|
protected const string pcLargeSelector = ":large-selector"; |
|
|
protected const string pcLightSelector = ":light-selector"; |
|
|
protected const string pcLightSelector = ":light-selector"; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -514,18 +515,19 @@ namespace Avalonia.Controls.Primitives |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private void UpdatePseudoClasses() |
|
|
private void UpdatePseudoClasses() |
|
|
{ |
|
|
{ |
|
|
//if (m_isPointerPressed)
|
|
|
if (_isPointerPressed) |
|
|
//{
|
|
|
{ |
|
|
// VisualStateManager.GoToState(this, m_shouldShowLargeSelection ? "PressedLarge" : "Pressed", useTransitions);
|
|
|
PseudoClasses.Set(pcLargeSelector, _shouldShowLargeSelection); |
|
|
//}
|
|
|
} |
|
|
//else if (m_isPointerOver)
|
|
|
else if (_isPointerOver) |
|
|
//{
|
|
|
{ |
|
|
// VisualStateManager.GoToState(this, "PointerOver", useTransitions);
|
|
|
//VisualStateManager.GoToState(this, "PointerOver", useTransitions);
|
|
|
//}
|
|
|
PseudoClasses.Set(pcLargeSelector, false); |
|
|
//else
|
|
|
} |
|
|
//{
|
|
|
else |
|
|
// VisualStateManager.GoToState(this, "Normal", useTransitions);
|
|
|
{ |
|
|
//}
|
|
|
PseudoClasses.Set(pcLargeSelector, false); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
PseudoClasses.Set(pcLightSelector, SelectionEllipseShouldBeLight()); |
|
|
PseudoClasses.Set(pcLightSelector, SelectionEllipseShouldBeLight()); |
|
|
|
|
|
|
|
|
|