Icons - Dropped SVG support and fixed filling

This commit is contained in:
Robert committed 2022-06-06 20:54:39 +02:00
1 parent dd40bdd544
commit 0d3890e560
30 files changed
+163 -571

No files matched your search

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
namespace Artemis.Core.LayerBrushes
{
@@ -42,7 +43,7 @@ namespace Artemis.Core.LayerBrushes
if (!IsEnabled)
throw new ArtemisPluginException(Plugin, "Can only add a layer brush descriptor when the plugin is enabled");
if (icon.ToLower().EndsWith(".svg"))
if (icon.Contains('.'))
icon = Plugin.ResolveRelativePath(icon);
LayerBrushDescriptor descriptor = new(displayName, description, icon, typeof(T), this);
_layerBrushDescriptors.Add(descriptor);
@@ -43,7 +43,7 @@ namespace Artemis.Core.LayerEffects
if (!IsEnabled)
throw new ArtemisPluginFeatureException(this, "Can only add a layer effect descriptor when the plugin is enabled");
if (icon.ToLower().EndsWith(".svg"))
if (icon.Contains('.'))
icon = Plugin.ResolveRelativePath(icon);
LayerEffectDescriptor descriptor = new(displayName, description, icon, typeof(T), this);
_layerEffectDescriptors.Add(descriptor);
@@ -151,7 +151,7 @@ namespace Artemis.Core
{
if (Icon == null)
return null;
return Icon.EndsWith(".svg") ? Plugin.ResolveRelativePath(Icon) : Icon;
return Icon.Contains('.') ? Plugin.ResolveRelativePath(Icon) : Icon;
}
}
+1 -1
View File
@@ -161,7 +161,7 @@ namespace Artemis.Core
{
if (Icon == null)
return null;
return Icon.EndsWith(".svg") ? Plugin.ResolveRelativePath(Icon) : Icon;
return Icon.Contains('.') ? Plugin.ResolveRelativePath(Icon) : Icon;
}
}