Skip to content

Commit

Permalink
CheckBox animation update
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Mar 25, 2019
1 parent e0719b8 commit 7e6ea40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion InputKit/Shared/Controls/CheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public partial class CheckBox : StatefulStackLayout, IValidatable
BorderColor = Color.Black,
TextColor = (Color)Label.TextColorProperty.DefaultValue,
Size = 25,
CornerRadius = -1,
CornerRadius = 4,
FontSize = 14,
};

Expand Down Expand Up @@ -331,6 +331,8 @@ public static void ApplyIsChecked(CheckBox checkBox, bool isChecked)
public static async void ApplyIsPressed(CheckBox checkBox, bool isPressed)
{
await checkBox.frmBackground.ScaleTo(isPressed ? .8 : 1, 50, Easing.BounceIn);
var radiusVal = isPressed ? checkBox.frmBackground.CornerRadius * 2f : checkBox.CornerRadius;
checkBox.frmBackground.CornerRadius = radiusVal;
}
#endregion

Expand Down

0 comments on commit 7e6ea40

Please sign in to comment.