Color issues
This commit is contained in:
@@ -171,7 +171,7 @@ public partial class FlyoutPageHandler : ViewHandler<IFlyoutView, SkiaFlyoutPage
|
||||
|
||||
if (flyoutView is FlyoutPage flyoutPage && flyoutPage.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.ScrimColor = solidBrush.Color.ToSKColor().WithAlpha(100);
|
||||
handler.PlatformView.ScrimColor = solidBrush.Color.WithAlpha(100f / 255f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public partial class IndicatorViewHandler : ViewHandler<IndicatorView, SkiaIndic
|
||||
|
||||
if (indicatorView.IndicatorColor is not null)
|
||||
{
|
||||
handler.PlatformView.IndicatorColor = indicatorView.IndicatorColor.ToSKColor();
|
||||
handler.PlatformView.IndicatorColor = indicatorView.IndicatorColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public partial class IndicatorViewHandler : ViewHandler<IndicatorView, SkiaIndic
|
||||
|
||||
if (indicatorView.SelectedIndicatorColor is not null)
|
||||
{
|
||||
handler.PlatformView.SelectedIndicatorColor = indicatorView.SelectedIndicatorColor.ToSKColor();
|
||||
handler.PlatformView.SelectedIndicatorColor = indicatorView.SelectedIndicatorColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ public partial class NavigationPageHandler : ViewHandler<NavigationPage, SkiaNav
|
||||
|
||||
if (navigationPage.BarBackgroundColor is not null)
|
||||
{
|
||||
handler.PlatformView.BarBackgroundColor = navigationPage.BarBackgroundColor.ToSKColor();
|
||||
handler.PlatformView.BarBackgroundColor = navigationPage.BarBackgroundColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ public partial class NavigationPageHandler : ViewHandler<NavigationPage, SkiaNav
|
||||
|
||||
if (navigationPage.BarBackground is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.BarBackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.BarBackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ public partial class NavigationPageHandler : ViewHandler<NavigationPage, SkiaNav
|
||||
|
||||
if (navigationPage.BarTextColor is not null)
|
||||
{
|
||||
handler.PlatformView.BarTextColor = navigationPage.BarTextColor.ToSKColor();
|
||||
handler.PlatformView.BarTextColor = navigationPage.BarTextColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public partial class RefreshViewHandler : ViewHandler<RefreshView, SkiaRefreshVi
|
||||
|
||||
if (refreshView.RefreshColor is not null)
|
||||
{
|
||||
handler.PlatformView.RefreshColor = refreshView.RefreshColor.ToSKColor();
|
||||
handler.PlatformView.RefreshColor = refreshView.RefreshColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public partial class RefreshViewHandler : ViewHandler<RefreshView, SkiaRefreshVi
|
||||
|
||||
if (refreshView.Background is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.RefreshBackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.RefreshBackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,17 +239,17 @@ public partial class ShellHandler : ViewHandler<Shell, SkiaShell>
|
||||
// Sync flyout colors
|
||||
if (shell.FlyoutBackgroundColor is Color flyoutBgColor)
|
||||
{
|
||||
platformView.FlyoutBackgroundColor = flyoutBgColor.ToSKColor();
|
||||
platformView.FlyoutBackgroundColor = flyoutBgColor;
|
||||
}
|
||||
else if (shell.FlyoutBackground is SolidColorBrush flyoutBrush)
|
||||
{
|
||||
platformView.FlyoutBackgroundColor = flyoutBrush.Color.ToSKColor();
|
||||
platformView.FlyoutBackgroundColor = flyoutBrush.Color;
|
||||
}
|
||||
|
||||
// Sync nav bar colors
|
||||
if (shell.BackgroundColor is Color bgColor)
|
||||
{
|
||||
platformView.NavBarBackgroundColor = bgColor.ToSKColor();
|
||||
platformView.NavBarBackgroundColor = bgColor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ public partial class ShellHandler : ViewHandler<Shell, SkiaShell>
|
||||
|
||||
if (shell.FlyoutBackgroundColor is Color color)
|
||||
{
|
||||
handler.PlatformView.FlyoutBackgroundColor = color.ToSKColor();
|
||||
handler.PlatformView.FlyoutBackgroundColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public partial class ShellHandler : ViewHandler<Shell, SkiaShell>
|
||||
|
||||
if (shell.FlyoutBackground is SolidColorBrush solidBrush)
|
||||
{
|
||||
handler.PlatformView.FlyoutBackgroundColor = solidBrush.Color.ToSKColor();
|
||||
handler.PlatformView.FlyoutBackgroundColor = solidBrush.Color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public partial class ShellHandler : ViewHandler<Shell, SkiaShell>
|
||||
|
||||
if (shell.BackgroundColor is Color color)
|
||||
{
|
||||
handler.PlatformView.NavBarBackgroundColor = color.ToSKColor();
|
||||
handler.PlatformView.NavBarBackgroundColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage
|
||||
|
||||
if (tabbedView is TabbedPage tabbedPage && tabbedPage.BarBackgroundColor is Color color)
|
||||
{
|
||||
handler.PlatformView.TabBarBackgroundColor = color.ToSKColor();
|
||||
handler.PlatformView.TabBarBackgroundColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage
|
||||
if (tabbedView is TabbedPage tabbedPage && tabbedPage.BarTextColor is Color color)
|
||||
{
|
||||
// BarTextColor applies to unselected tabs
|
||||
handler.PlatformView.UnselectedTabColor = color.ToSKColor();
|
||||
handler.PlatformView.UnselectedTabColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +147,8 @@ public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage
|
||||
|
||||
if (tabbedView is TabbedPage tabbedPage && tabbedPage.SelectedTabColor is Color color)
|
||||
{
|
||||
handler.PlatformView.SelectedTabColor = color.ToSKColor();
|
||||
handler.PlatformView.IndicatorColor = color.ToSKColor();
|
||||
handler.PlatformView.SelectedTabColor = color;
|
||||
handler.PlatformView.IndicatorColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage
|
||||
|
||||
if (tabbedView is TabbedPage tabbedPage && tabbedPage.UnselectedTabColor is Color color)
|
||||
{
|
||||
handler.PlatformView.UnselectedTabColor = color.ToSKColor();
|
||||
handler.PlatformView.UnselectedTabColor = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user