mirror of
https://github.com/bitwarden/mobile
synced 2026-01-05 10:03:26 +00:00
fix cursor color to renderers
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Bit.iOS.Renderers;
|
||||
using System.ComponentModel;
|
||||
using UIKit;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Platform.iOS;
|
||||
@@ -18,7 +19,22 @@ namespace Bit.iOS.Renderers
|
||||
// Remove padding
|
||||
Control.TextContainerInset = new UIEdgeInsets(0, 0, 0, 0);
|
||||
Control.TextContainer.LineFragmentPadding = 0;
|
||||
UpdateTintColor();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
base.OnElementPropertyChanged(sender, e);
|
||||
if(e.PropertyName == Editor.TextColorProperty.PropertyName)
|
||||
{
|
||||
UpdateTintColor();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTintColor()
|
||||
{
|
||||
Control.TintColor = Element.TextColor.ToUIColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace Bit.iOS.Renderers
|
||||
if(Control != null && e.NewElement is Entry)
|
||||
{
|
||||
Control.ClearButtonMode = UITextFieldViewMode.WhileEditing;
|
||||
UpdateTintColor();
|
||||
UpdateFontSize();
|
||||
iOSHelpers.SetBottomBorder(Control);
|
||||
}
|
||||
@@ -30,6 +31,10 @@ namespace Bit.iOS.Renderers
|
||||
{
|
||||
UpdateFontSize();
|
||||
}
|
||||
else if(e.PropertyName == Entry.TextColorProperty.PropertyName)
|
||||
{
|
||||
UpdateTintColor();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateFontSize()
|
||||
@@ -47,5 +52,10 @@ namespace Bit.iOS.Renderers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTintColor()
|
||||
{
|
||||
Control.TintColor = Element.TextColor.ToUIColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user