|
|
|
@ -31,24 +31,25 @@ internal class PlatformSettings : DefaultPlatformSettings |
|
|
|
if (tintColor is not null) |
|
|
|
{ |
|
|
|
tintColor.GetRGBA(out var red, out var green, out var blue, out var alpha); |
|
|
|
return _lastColorValues = new PlatformColorValues |
|
|
|
if (red != 0 && green != 0 && blue != 0 && alpha != 0) |
|
|
|
{ |
|
|
|
ThemeVariant = themeVariant, |
|
|
|
ContrastPreference = contrastPreference, |
|
|
|
AccentColor1 = new Color( |
|
|
|
(byte)(alpha * 255), |
|
|
|
(byte)(red * 255), |
|
|
|
(byte)(green * 255), |
|
|
|
(byte)(blue * 255)) |
|
|
|
}; |
|
|
|
return _lastColorValues = new PlatformColorValues |
|
|
|
{ |
|
|
|
ThemeVariant = themeVariant, |
|
|
|
ContrastPreference = contrastPreference, |
|
|
|
AccentColor1 = new Color( |
|
|
|
(byte)(alpha * 255), |
|
|
|
(byte)(red * 255), |
|
|
|
(byte)(green * 255), |
|
|
|
(byte)(blue * 255)) |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
return _lastColorValues = new PlatformColorValues |
|
|
|
{ |
|
|
|
return _lastColorValues = new PlatformColorValues |
|
|
|
{ |
|
|
|
ThemeVariant = themeVariant, ContrastPreference = contrastPreference |
|
|
|
}; |
|
|
|
} |
|
|
|
ThemeVariant = themeVariant, ContrastPreference = contrastPreference |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
public void TraitCollectionDidChange() |
|
|
|
|