Layer brushes - Added RGB.NET-based layer brushes

Layer brushes - Added sample RGB.NET-based color brush
Layer properties - Save on gradient edit dialog close
Layer properties - Fix layer brush keyframes not working after changing layer brush
This commit is contained in:
SpoinkyNL committed 2020-05-31 21:58:06 +02:00
1 parent b8f7fb3887
commit efee645bfb
31 files changed
+550 -146

No files matched your search

@@ -1,6 +1,7 @@
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
@@ -8,6 +9,7 @@ using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.Colors;
using Artemis.UI.Shared.Annotations;
using Artemis.UI.Shared.Services.Interfaces;
using Stylet;
namespace Artemis.UI.Shared.Controls
{
@@ -19,6 +21,9 @@ namespace Artemis.UI.Shared.Controls
private static IGradientPickerService _gradientPickerService;
private bool _inCallback;
public event EventHandler DialogOpened;
public event EventHandler DialogClosed;
public GradientPicker()
{
InitializeComponent();
@@ -77,7 +82,12 @@ namespace Artemis.UI.Shared.Controls
private void UIElement_OnMouseUp(object sender, MouseButtonEventArgs e)
{
GradientPickerService.ShowGradientPicker(ColorGradient, DialogHost);
Execute.OnUIThread(async () =>
{
OnDialogOpened();
await GradientPickerService.ShowGradientPicker(ColorGradient, DialogHost);
OnDialogClosed();
});
}
#region Static WPF fields
@@ -92,5 +102,15 @@ namespace Artemis.UI.Shared.Controls
EventManager.RegisterRoutedEvent(nameof(ColorGradient), RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler<ColorGradient>), typeof(GradientPicker));
#endregion
protected virtual void OnDialogOpened()
{
DialogOpened?.Invoke(this, EventArgs.Empty);
}
protected virtual void OnDialogClosed()
{
DialogClosed?.Invoke(this, EventArgs.Empty);
}
}
}