mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
entry font set by name only when font family is set for the element.
This commit is contained in:
parent
596a74b394
commit
c2cb5ac7c9
1 changed files with 10 additions and 2 deletions
|
@ -106,7 +106,8 @@ namespace Bit.iOS.Controls
|
||||||
|
|
||||||
private void UpdateFont()
|
private void UpdateFont()
|
||||||
{
|
{
|
||||||
var pointSize = UIFontDescriptor.PreferredBody.PointSize;
|
var descriptor = UIFontDescriptor.PreferredBody;
|
||||||
|
var pointSize = descriptor.PointSize;
|
||||||
|
|
||||||
var size = Element.FontSize;
|
var size = Element.FontSize;
|
||||||
if(size == Device.GetNamedSize(NamedSize.Large, typeof(ExtendedEntry)))
|
if(size == Device.GetNamedSize(NamedSize.Large, typeof(ExtendedEntry)))
|
||||||
|
@ -122,8 +123,15 @@ namespace Bit.iOS.Controls
|
||||||
pointSize *= .6f;
|
pointSize *= .6f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!string.IsNullOrWhiteSpace(Element.FontFamily))
|
||||||
|
{
|
||||||
Control.Font = UIFont.FromName(Element.FontFamily, pointSize);
|
Control.Font = UIFont.FromName(Element.FontFamily, pointSize);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Control.Font = UIFont.FromDescriptor(descriptor, pointSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void SetBorder(ExtendedEntry view)
|
private void SetBorder(ExtendedEntry view)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue