1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-02 00:23:15 +00:00

Fixed some Large Font Accessibility issues on Vault and Send screens for Icons Display #1774 (#1785)

This commit is contained in:
Federico Maccaroni
2022-02-17 19:34:22 -03:00
committed by GitHub
parent dbaa32b02c
commit ea471b0749
14 changed files with 81 additions and 17 deletions

View File

@@ -0,0 +1,21 @@
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Internals;
using Xamarin.Forms.Platform.iOS;
namespace Bit.iOS.Core.Utilities
{
public static class FontElementExtensions
{
public static UIFont ToUIFont(this IFontElement fontElement)
{
var fontSize = fontElement.FontSize;
var fontAttributes = fontElement.FontAttributes;
var fontFamily = fontElement.FontFamily;
return fontFamily is null
? Font.SystemFontOfSize(fontSize, fontAttributes).ToUIFont()
: Font.OfSize(fontFamily, fontSize).WithAttributes(fontAttributes).ToUIFont();
}
}
}