mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Cleaned up ProfileService render condition
This commit is contained in:
parent
b39dd14526
commit
5877e4dd20
@ -125,7 +125,7 @@ public sealed class Profile : ProfileElement
|
|||||||
profileScript.OnProfileRendering(canvas, canvas.LocalClipBounds);
|
profileScript.OnProfileRendering(canvas, canvas.LocalClipBounds);
|
||||||
|
|
||||||
using var opacityPaint = new SKPaint();
|
using var opacityPaint = new SKPaint();
|
||||||
if (Configuration.FadeInAndOut && Opacity != 1)
|
if (Configuration.FadeInAndOut && Opacity < 1)
|
||||||
opacityPaint.Color = new SKColor(0, 0, 0, (byte)(255d * Easings.CubicEaseInOut(Opacity)));
|
opacityPaint.Color = new SKColor(0, 0, 0, (byte)(255d * Easings.CubicEaseInOut(Opacity)));
|
||||||
|
|
||||||
canvas.SaveLayer(opacityPaint);
|
canvas.SaveLayer(opacityPaint);
|
||||||
|
|||||||
@ -263,7 +263,8 @@ internal class ProfileService : IProfileService
|
|||||||
{
|
{
|
||||||
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
|
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
|
||||||
// Ensure all criteria are met before rendering
|
// Ensure all criteria are met before rendering
|
||||||
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && (profileConfiguration.ActivationConditionMet || (profileConfiguration.Profile?.ShouldDisplay == false && profileConfiguration.Profile?.Opacity >= 0)))
|
bool fadingOut = profileConfiguration.Profile?.ShouldDisplay == false && profileConfiguration.Profile?.Opacity > 0;
|
||||||
|
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && (profileConfiguration.ActivationConditionMet || fadingOut))
|
||||||
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty, null);
|
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty, null);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user