This commit is contained in:
TheXamlGuy
2024-04-26 23:05:36 +01:00
parent 9f90ef693d
commit bc55c4649b
206 changed files with 3106 additions and 3204 deletions
@@ -7,13 +7,13 @@ using Avalonia.Styling;
namespace Toolkit.UI.Controls.Avalonia;
public class FastRendererBackground :
public class FastRendererBackground :
Image, IDisposable
{
private const int ImageWidth = 100;
private const int ImageHeight = 100;
private readonly WriteableBitmap bitmap = new(new PixelSize(ImageWidth, ImageHeight),
private readonly WriteableBitmap bitmap = new(new PixelSize(ImageWidth, ImageHeight),
new Vector(96, 96), PixelFormat.Bgra8888);
private readonly FastNoiseBackgroundRenderer renderer = new();
@@ -29,7 +29,7 @@ public class FastRendererBackground :
base.EndInit();
if (Application.Current?.ActualThemeVariant is ThemeVariant theme)
{
renderer.UpdateValues((Color)Application.Current.FindResource("SystemAccentColorLight3"),
renderer.UpdateValues((Color)Application.Current.FindResource("SystemAccentColorLight3"),
(Color)Application.Current.FindResource("SystemAccentColorDark3"), theme);
}
@@ -41,4 +41,4 @@ public class FastRendererBackground :
GC.SuppressFinalize(this);
bitmap.Dispose();
}
}
}