mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Profile editor - Fixed new elements not rendering while paused
Profile editor - Use default brush on new layers Profile tree - Implement drag & drop
This commit is contained in:
1 parent
f5a902f5a5
commit
376a9142d3
14 files changed
+335
-229
No files matched your search
@@ -185,7 +185,7 @@ namespace Artemis.Core
|
||||
// No point rendering if all children are disabled
|
||||
if (!Children.Any(c => c is RenderProfileElement {Enabled: true}))
|
||||
return;
|
||||
|
||||
|
||||
SKPaint layerPaint = new() {FilterQuality = SKFilterQuality.Low};
|
||||
try
|
||||
{
|
||||
@@ -266,7 +266,7 @@ namespace Artemis.Core
|
||||
/// Occurs when a property affecting the rendering properties of this folder has been updated
|
||||
/// </summary>
|
||||
public event EventHandler? RenderPropertiesUpdated;
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
|
||||
@@ -27,5 +27,7 @@ namespace Artemis.Core.Services
|
||||
/// Returns the descriptor of the default layer brush
|
||||
/// </summary>
|
||||
LayerBrushDescriptor? GetDefaultLayerBrush();
|
||||
|
||||
void ApplyDefaultBrush(Layer layer);
|
||||
}
|
||||
}
|
||||
@@ -46,5 +46,13 @@ namespace Artemis.Core.Services
|
||||
defaultReference.Value.BrushType ??= "SolidBrush";
|
||||
return LayerBrushStore.Get(defaultReference.Value.LayerBrushProviderId, defaultReference.Value.BrushType)?.LayerBrushDescriptor;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ApplyDefaultBrush(Layer layer)
|
||||
{
|
||||
LayerBrushDescriptor? brush = GetDefaultLayerBrush();
|
||||
if (brush != null)
|
||||
layer.ChangeLayerBrush(brush.CreateInstance(layer, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user