ui adjustment
This commit is contained in:
@@ -13,14 +13,22 @@ namespace Pixiview.iOS.Renderers
|
||||
{
|
||||
base.OnElementChanged(e);
|
||||
|
||||
if (Control != null && Element is RoundLabel label)
|
||||
var layer = Layer;
|
||||
if (layer != null && e.NewElement is RoundLabel label)
|
||||
{
|
||||
int radius = label.CornerRadius;
|
||||
var radius = label.CornerRadius;
|
||||
if (radius > 0)
|
||||
{
|
||||
Control.Layer.CornerRadius = radius;
|
||||
Control.BackgroundColor = label.BackgroundColor.ToUIColor();
|
||||
Control.Layer.MasksToBounds = true;
|
||||
layer.CornerRadius = radius;
|
||||
//layer.MasksToBounds = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
layer.CornerRadius = 0;
|
||||
}
|
||||
if (layer.BackgroundColor != default)
|
||||
{
|
||||
layer.BackgroundColor = label.BackgroundColor.ToCGColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,14 +39,15 @@ namespace Pixiview.iOS.Renderers
|
||||
|
||||
if (e.PropertyName == RoundLabel.CornerRadiusProperty.PropertyName)
|
||||
{
|
||||
if (Control != null && Element is RoundLabel label)
|
||||
var layer = Layer;
|
||||
if (layer != null && Element is RoundLabel label)
|
||||
{
|
||||
int radius = label.CornerRadius;
|
||||
var radius = label.CornerRadius;
|
||||
if (radius > 0)
|
||||
{
|
||||
Control.Layer.CornerRadius = radius;
|
||||
Control.BackgroundColor = label.BackgroundColor.ToUIColor();
|
||||
Control.Layer.MasksToBounds = true;
|
||||
layer.CornerRadius = radius;
|
||||
layer.BackgroundColor = label.BackgroundColor.ToCGColor();
|
||||
//layer.MasksToBounds = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user