Missing backgroundcolor
This commit is contained in:
@@ -56,7 +56,7 @@ public class ActivityIndicatorHandler : ViewHandler<IActivityIndicator, SkiaActi
|
||||
{
|
||||
if (activityIndicator.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public partial class ActivityIndicatorHandler : ViewHandler<IActivityIndicator,
|
||||
|
||||
if (activityIndicator.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ public partial class BorderHandler : ViewHandler<IBorderView, SkiaBorder>
|
||||
|
||||
if (border.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ public partial class BorderHandler : ViewHandler<IBorderView, SkiaBorder>
|
||||
|
||||
if (border is VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public partial class BoxViewHandler : ViewHandler<BoxView, SkiaBoxView>
|
||||
{
|
||||
if (boxView.Background is SolidColorBrush solidBrush && solidBrush.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public partial class BoxViewHandler : ViewHandler<BoxView, SkiaBoxView>
|
||||
{
|
||||
if (boxView.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = boxView.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = boxView.BackgroundColor;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,8 @@ public partial class ButtonHandler : ViewHandler<IButton, SkiaButton>
|
||||
|
||||
if (button.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
// Set BackgroundColor (used for rendering)
|
||||
handler.PlatformView.BackgroundColor = new SKColor(
|
||||
(byte)(solidPaint.Color.Red * 255),
|
||||
(byte)(solidPaint.Color.Green * 255),
|
||||
(byte)(solidPaint.Color.Blue * 255),
|
||||
(byte)(solidPaint.Color.Alpha * 255));
|
||||
// Set BackgroundColor (MAUI Color type)
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ public partial class CarouselViewHandler : ViewHandler<CarouselView, SkiaCarouse
|
||||
|
||||
if (carouselView.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class CheckBoxHandler : ViewHandler<ICheckBox, SkiaCheckBox>
|
||||
{
|
||||
if (checkBox.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public partial class CollectionViewHandler : ViewHandler<CollectionView, SkiaCol
|
||||
|
||||
if (collectionView.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ public partial class CollectionViewHandler : ViewHandler<CollectionView, SkiaCol
|
||||
|
||||
if (collectionView.BackgroundColor is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = collectionView.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = collectionView.BackgroundColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public partial class DatePickerHandler : ViewHandler<IDatePicker, SkiaDatePicker
|
||||
platformView.TextColor = Color.FromRgb(224, 224, 224);
|
||||
platformView.BorderColor = Color.FromRgb(97, 97, 97);
|
||||
platformView.DisabledDayColor = Color.FromRgb(97, 97, 97);
|
||||
platformView.BackgroundColor = Color.FromRgb(45, 45, 45).ToSKColor();
|
||||
platformView.BackgroundColor = Color.FromRgb(45, 45, 45);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ public partial class DatePickerHandler : ViewHandler<IDatePicker, SkiaDatePicker
|
||||
|
||||
if (datePicker.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class EditorHandler : ViewHandler<IEditor, SkiaEditor>
|
||||
{
|
||||
if (handler.PlatformView != null && editor.PlaceholderColor != null)
|
||||
{
|
||||
handler.PlatformView.PlaceholderColor = editor.PlaceholderColor.ToSKColor();
|
||||
handler.PlatformView.PlaceholderColor = editor.PlaceholderColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class EditorHandler : ViewHandler<IEditor, SkiaEditor>
|
||||
{
|
||||
if (handler.PlatformView != null && editor.TextColor != null)
|
||||
{
|
||||
handler.PlatformView.TextColor = editor.TextColor.ToSKColor();
|
||||
handler.PlatformView.TextColor = editor.TextColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class EditorHandler : ViewHandler<IEditor, SkiaEditor>
|
||||
{
|
||||
if (editor.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ public class EditorHandler : ViewHandler<IEditor, SkiaEditor>
|
||||
{
|
||||
if (editor is VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public class EntryHandler : ViewHandler<IEntry, SkiaEntry>
|
||||
{
|
||||
if (entry.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ public partial class EntryHandler : ViewHandler<IEntry, SkiaEntry>
|
||||
|
||||
if (entry.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -85,11 +85,7 @@ public partial class FrameHandler : ViewHandler<Frame, SkiaFrame>
|
||||
{
|
||||
if (frame.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = new SKColor(
|
||||
(byte)(frame.BackgroundColor.Red * 255),
|
||||
(byte)(frame.BackgroundColor.Green * 255),
|
||||
(byte)(frame.BackgroundColor.Blue * 255),
|
||||
(byte)(frame.BackgroundColor.Alpha * 255));
|
||||
handler.PlatformView.BackgroundColor = frame.BackgroundColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public partial class GraphicsViewHandler : ViewHandler<IGraphicsView, SkiaGraphi
|
||||
|
||||
if (graphicsView.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ public class ImageHandler : ViewHandler<IImage, SkiaImage>
|
||||
{
|
||||
if (image.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public partial class ItemsViewHandler<TItemsView> : ViewHandler<TItemsView, Skia
|
||||
|
||||
if (itemsView.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ public class LabelHandler : ViewHandler<ILabel, SkiaLabel>
|
||||
{
|
||||
if (label.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,11 +205,7 @@ public partial class LabelHandler : ViewHandler<ILabel, SkiaLabel>
|
||||
|
||||
if (label.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = new SKColor(
|
||||
(byte)(solidPaint.Color.Red * 255),
|
||||
(byte)(solidPaint.Color.Green * 255),
|
||||
(byte)(solidPaint.Color.Blue * 255),
|
||||
(byte)(solidPaint.Color.Alpha * 255));
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public partial class LayoutHandler : ViewHandler<ILayout, SkiaLayoutView>
|
||||
// (e.g., in ItemTemplates for CollectionView)
|
||||
if (VirtualView is Microsoft.Maui.Controls.VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
platformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
platformView.BackgroundColor = ve.BackgroundColor;
|
||||
platformView.Invalidate();
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public partial class LayoutHandler : ViewHandler<ILayout, SkiaLayoutView>
|
||||
var background = layout.Background;
|
||||
if (background is SolidColorBrush solidBrush && solidBrush.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public partial class LayoutHandler : ViewHandler<ILayout, SkiaLayoutView>
|
||||
{
|
||||
if (layout is Microsoft.Maui.Controls.VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public partial class LayoutHandler : ViewHandler<ILayout, SkiaLayoutView>
|
||||
// Explicitly map BackgroundColor since it may be set before handler creation
|
||||
if (VirtualView is Microsoft.Maui.Controls.VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
platformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
platformView.BackgroundColor = ve.BackgroundColor;
|
||||
}
|
||||
|
||||
for (int i = 0; i < VirtualView.Count; i++)
|
||||
@@ -88,7 +88,7 @@ public partial class LayoutHandler : ViewHandler<ILayout, SkiaLayoutView>
|
||||
|
||||
if (layout.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ public partial class GridHandler : LayoutHandler
|
||||
// Explicitly map BackgroundColor since it may be set before handler creation
|
||||
if (VirtualView is Microsoft.Maui.Controls.VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
platformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
platformView.BackgroundColor = ve.BackgroundColor;
|
||||
}
|
||||
|
||||
// Explicitly map Padding since it may be set before handler creation
|
||||
|
||||
@@ -394,7 +394,7 @@ public partial class NavigationPageHandler : ViewHandler<NavigationPage, SkiaNav
|
||||
|
||||
if (navigationPage.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public partial class PageHandler : ViewHandler<Page, SkiaPage>
|
||||
|
||||
if (page.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public partial class PageHandler : ViewHandler<Page, SkiaPage>
|
||||
var backgroundColor = page.BackgroundColor;
|
||||
if (backgroundColor != null && backgroundColor != Colors.Transparent)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = backgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = backgroundColor;
|
||||
Console.WriteLine($"[PageHandler] MapBackgroundColor: {backgroundColor}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public class PickerHandler : ViewHandler<IPicker, SkiaPicker>
|
||||
{
|
||||
if (picker.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public partial class PickerHandler : ViewHandler<IPicker, SkiaPicker>
|
||||
|
||||
if (picker.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ProgressBarHandler : ViewHandler<IProgress, SkiaProgressBar>
|
||||
{
|
||||
if (progress.ProgressColor != null)
|
||||
{
|
||||
handler.PlatformView.ProgressColor = progress.ProgressColor.ToSKColor();
|
||||
handler.PlatformView.ProgressColor = progress.ProgressColor;
|
||||
}
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class ProgressBarHandler : ViewHandler<IProgress, SkiaProgressBar>
|
||||
{
|
||||
if (progress.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class ProgressBarHandler : ViewHandler<IProgress, SkiaProgressBar>
|
||||
{
|
||||
if (progress is VisualElement ve && ve.BackgroundColor != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = ve.BackgroundColor;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public partial class ProgressBarHandler : ViewHandler<IProgress, SkiaProgressBar
|
||||
|
||||
if (progress.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
handler.PlatformView.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class RadioButtonHandler : ViewHandler<IRadioButton, SkiaRadioButton>
|
||||
{
|
||||
if (radioButton.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public partial class RadioButtonHandler : ViewHandler<IRadioButton, SkiaRadioBut
|
||||
|
||||
if (radioButton.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class SearchBarHandler : ViewHandler<ISearchBar, SkiaSearchBar>
|
||||
{
|
||||
if (searchBar.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public partial class SearchBarHandler : ViewHandler<ISearchBar, SkiaSearchBar>
|
||||
|
||||
if (searchBar.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ public class SliderHandler : ViewHandler<ISlider, SkiaSlider>
|
||||
{
|
||||
if (slider.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public partial class SliderHandler : ViewHandler<ISlider, SkiaSlider>
|
||||
|
||||
if (slider.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ public class StepperHandler : ViewHandler<IStepper, SkiaStepper>
|
||||
{
|
||||
if (stepper.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public partial class StepperHandler : ViewHandler<IStepper, SkiaStepper>
|
||||
|
||||
if (stepper.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ public partial class SwipeViewHandler : ViewHandler<SwipeView, SkiaSwipeView>
|
||||
|
||||
if (swipeView.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,14 +211,14 @@ public partial class SwipeViewHandler : ViewHandler<SwipeView, SkiaSwipeView>
|
||||
var bgColor = swipeItem.BackgroundColor;
|
||||
if (bgColor is not null)
|
||||
{
|
||||
platformItem.BackgroundColor = bgColor.ToSKColor();
|
||||
platformItem.BackgroundColor = bgColor;
|
||||
}
|
||||
}
|
||||
else if (item is Controls.SwipeItemView swipeItemView)
|
||||
{
|
||||
// SwipeItemView uses custom content - use a simple representation
|
||||
platformItem.Text = "Action";
|
||||
platformItem.BackgroundColor = new SKColor(100, 100, 100);
|
||||
platformItem.BackgroundColor = Color.FromRgb(100, 100, 100);
|
||||
}
|
||||
|
||||
return platformItem;
|
||||
|
||||
@@ -89,7 +89,7 @@ public class SwitchHandler : ViewHandler<ISwitch, SkiaSwitch>
|
||||
{
|
||||
if (@switch.Background is SolidPaint solidPaint && solidPaint.Color != null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public partial class SwitchHandler : ViewHandler<ISwitch, SkiaSwitch>
|
||||
if (@switch.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
// Background color for the switch container (not the track)
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public partial class TimePickerHandler : ViewHandler<ITimePicker, SkiaTimePicker
|
||||
platformView.ClockFaceColor = Color.FromRgb(45, 45, 45);
|
||||
platformView.TextColor = Color.FromRgb(224, 224, 224);
|
||||
platformView.BorderColor = Color.FromRgb(97, 97, 97);
|
||||
platformView.BackgroundColor = Color.FromRgb(45, 45, 45).ToSKColor();
|
||||
platformView.BackgroundColor = Color.FromRgb(45, 45, 45);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ public partial class TimePickerHandler : ViewHandler<ITimePicker, SkiaTimePicker
|
||||
|
||||
if (timePicker.Background is SolidPaint solidPaint && solidPaint.Color is not null)
|
||||
{
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color.ToSKColor();
|
||||
handler.PlatformView.BackgroundColor = solidPaint.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user