Missing backgroundcolor

This commit is contained in:
2026-01-17 03:10:29 +00:00
parent 5443c7c22a
commit aad915ad86
63 changed files with 177 additions and 143 deletions

View File

@@ -486,23 +486,18 @@ public class LinuxViewRenderer
if (contentView != null)
{
// Get page background color if set
SKColor? bgColor = null;
Color? bgColor = null;
if (cp.BackgroundColor != null && cp.BackgroundColor != Colors.Transparent)
{
var color = cp.BackgroundColor;
bgColor = new SKColor(
(byte)(color.Red * 255f),
(byte)(color.Green * 255f),
(byte)(color.Blue * 255f),
(byte)(color.Alpha * 255f));
bgColor = cp.BackgroundColor;
Console.WriteLine($"[CreateShellContentPage] Page BackgroundColor: {bgColor}");
}
if (contentView is SkiaScrollView scrollView)
{
if (bgColor.HasValue)
if (bgColor != null)
{
scrollView.BackgroundColor = bgColor.Value;
scrollView.BackgroundColor = bgColor;
}
return scrollView;
}
@@ -512,9 +507,9 @@ public class LinuxViewRenderer
{
Content = contentView
};
if (bgColor.HasValue)
if (bgColor != null)
{
newScrollView.BackgroundColor = bgColor.Value;
newScrollView.BackgroundColor = bgColor;
}
return newScrollView;
}