rename opacity to opacity_percent for consistency (#2310)
This commit is contained in:
@@ -8,7 +8,8 @@ public class ImageGraphicsElement
|
||||
{
|
||||
public string Image { get; set; }
|
||||
|
||||
public int? Opacity { get; set; }
|
||||
[YamlMember(Alias = "opacity_percent", ApplyNamingConventions = false)]
|
||||
public int? OpacityPercent { get; set; }
|
||||
|
||||
[YamlMember(Alias = "opacity_expression", ApplyNamingConventions = false)]
|
||||
public string OpacityExpression { get; set; }
|
||||
|
||||
@@ -6,7 +6,8 @@ namespace ErsatzTV.Core.Graphics;
|
||||
|
||||
public class TextGraphicsElement
|
||||
{
|
||||
public int? Opacity { get; set; }
|
||||
[YamlMember(Alias = "opacity_percent", ApplyNamingConventions = false)]
|
||||
public int? OpacityPercent { get; set; }
|
||||
|
||||
[YamlMember(Alias = "opacity_expression", ApplyNamingConventions = false)]
|
||||
public string OpacityExpression { get; set; }
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ImageElement(ImageGraphicsElement imageGraphicsElement, ILogger log
|
||||
}
|
||||
else
|
||||
{
|
||||
_opacity = (imageGraphicsElement.Opacity ?? 100) / 100.0f;
|
||||
_opacity = (imageGraphicsElement.OpacityPercent ?? 100) / 100.0f;
|
||||
}
|
||||
|
||||
ZIndex = imageGraphicsElement.ZIndex ?? 0;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TextElement(TextGraphicsElement textElement, Dictionary<string, obj
|
||||
}
|
||||
else
|
||||
{
|
||||
_opacity = (textElement.Opacity ?? 100) / 100.0f;
|
||||
_opacity = (textElement.OpacityPercent ?? 100) / 100.0f;
|
||||
}
|
||||
|
||||
ZIndex = textElement.ZIndex ?? 0;
|
||||
|
||||
Reference in New Issue
Block a user