More fixes

This commit is contained in:
2026-01-17 05:22:37 +00:00
parent f62d4aa5f2
commit 7d2ac327a3
58 changed files with 754 additions and 666 deletions

View File

@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using Microsoft.Maui.Graphics;
using SkiaSharp;
using Xunit;
@@ -36,7 +37,7 @@ public class SkiaSwipeViewTests
public void LeftItems_CanAddItems()
{
var swipeView = new SkiaSwipeView();
var item = new SwipeItem { Text = "Delete", BackgroundColor = SKColors.Red };
var item = new SwipeItem { Text = "Delete", BackgroundColor = Colors.Red };
swipeView.LeftItems.Add(item);
@@ -48,7 +49,7 @@ public class SkiaSwipeViewTests
public void RightItems_CanAddItems()
{
var swipeView = new SkiaSwipeView();
var item = new SwipeItem { Text = "Archive", BackgroundColor = SKColors.Blue };
var item = new SwipeItem { Text = "Archive", BackgroundColor = Colors.Blue };
swipeView.RightItems.Add(item);
@@ -146,17 +147,17 @@ public class SkiaSwipeViewTests
[Fact]
public void SwipeItem_TextColor_CanBeSet()
{
var item = new SwipeItem { TextColor = SKColors.Yellow };
var item = new SwipeItem { TextColor = Colors.Yellow };
Assert.Equal(SKColors.Yellow, item.TextColor);
Assert.Equal(Colors.Yellow, item.TextColor);
}
[Fact]
public void SwipeItem_BackgroundColor_CanBeSet()
{
var item = new SwipeItem { BackgroundColor = SKColors.Green };
var item = new SwipeItem { BackgroundColor = Colors.Green };
Assert.Equal(SKColors.Green, item.BackgroundColor);
Assert.Equal(Colors.Green, item.BackgroundColor);
}
[Fact]
@@ -190,7 +191,7 @@ public class SkiaSwipeViewTests
{
var swipeView = new SkiaSwipeView();
swipeView.Content = new SkiaLabel { Text = "Content" };
swipeView.Arrange(new SKRect(0, 0, 300, 50));
swipeView.Arrange(new Rect(0, 0, 300, 50));
var hit = swipeView.HitTest(150, 25);
@@ -203,7 +204,7 @@ public class SkiaSwipeViewTests
var swipeView = new SkiaSwipeView();
swipeView.Content = new SkiaLabel { Text = "Test" };
var size = swipeView.Measure(new SKSize(300, 100));
var size = swipeView.Measure(new Size(300, 100));
Assert.True(size.Width <= 300);
Assert.True(size.Height <= 100);