mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 03:23:23 +00:00
Android font size adjustments
This commit is contained in:
@@ -54,7 +54,6 @@
|
||||
<Compile Include="Behaviors\RequiredValidationBehavior.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="Controls\DismissModalToolBarItem.cs" />
|
||||
<Compile Include="Controls\EntryLabel.cs" />
|
||||
<Compile Include="Controls\ExtendedEditor.cs" />
|
||||
<Compile Include="Controls\ExtendedButton.cs" />
|
||||
<Compile Include="Controls\ExtendedNavigationPage.cs" />
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class EntryLabel : Label
|
||||
{
|
||||
public EntryLabel()
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label));
|
||||
TextColor = Color.FromHex("777777");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,8 @@ namespace Bit.App.Controls
|
||||
Editor = new ExtendedEditor
|
||||
{
|
||||
Keyboard = entryKeyboard,
|
||||
HasBorder = false
|
||||
HasBorder = false,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Editor))
|
||||
};
|
||||
|
||||
if(height.HasValue)
|
||||
@@ -29,7 +30,6 @@ namespace Bit.App.Controls
|
||||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
Editor.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label));
|
||||
Editor.Margin = new Thickness(-4, -2, -4, -10);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace Bit.App.Controls
|
||||
HasBorder = false,
|
||||
IsPassword = IsPassword,
|
||||
AllowClear = true,
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Entry))
|
||||
};
|
||||
|
||||
if(useLabelAsPlaceholder)
|
||||
@@ -78,11 +79,9 @@ namespace Bit.App.Controls
|
||||
|
||||
if(Device.OS == TargetPlatform.Android)
|
||||
{
|
||||
Entry.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label));
|
||||
formStackLayout.Spacing = 0;
|
||||
if(!useLabelAsPlaceholder)
|
||||
{
|
||||
Entry.Margin = new Thickness(-4, -2, -4, -10);
|
||||
Entry.Margin = new Thickness(-11, 0, -11, -5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Label = new Label
|
||||
{
|
||||
LineBreakMode = LineBreakMode.TailTruncation
|
||||
LineBreakMode = LineBreakMode.TailTruncation,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||
};
|
||||
|
||||
Detail = new Label
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Bit.App.Controls
|
||||
Value = new Label
|
||||
{
|
||||
Text = valueText,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
LineBreakMode = LineBreakMode.TailTruncation
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Bit.App.Controls
|
||||
HorizontalTextAlignment = TextAlignment.Center,
|
||||
FontSize = 35,
|
||||
FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier")
|
||||
};
|
||||
};
|
||||
|
||||
Entry = new ExtendedEntry
|
||||
{
|
||||
|
||||
@@ -10,7 +10,8 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Text = labelText,
|
||||
HorizontalOptions = LayoutOptions.Start,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||
};
|
||||
|
||||
StepperValueLabel = new Label
|
||||
@@ -19,7 +20,8 @@ namespace Bit.App.Controls
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
HorizontalTextAlignment = TextAlignment.Start,
|
||||
Text = value.ToString(),
|
||||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
Style = (Style)Application.Current.Resources["text-muted"],
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||
};
|
||||
|
||||
Stepper = new Stepper
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Bit.App.Pages
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
Style = (Style)Application.Current.Resources["btn-primary"],
|
||||
FontSize = Device.GetNamedSize(NamedSize.Default, typeof(Button))
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Button))
|
||||
};
|
||||
|
||||
var loginButton = new Button
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var versionLabel = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
Text = $@"Version {_appInfoService.Version} ({_appInfoService.Build})
|
||||
© 8bit Solutions LLC 2015-{DateTime.Now.Year}",
|
||||
HorizontalTextAlignment = TextAlignment.Center
|
||||
|
||||
@@ -407,6 +407,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
Label = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
LineBreakMode = LineBreakMode.TailTruncation,
|
||||
Text = labelText
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
var label = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
LineBreakMode = LineBreakMode.TailTruncation,
|
||||
Text = labelText
|
||||
};
|
||||
|
||||
@@ -180,6 +180,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
Text = "Length",
|
||||
HorizontalOptions = LayoutOptions.Start,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand
|
||||
@@ -193,6 +194,7 @@ namespace Bit.App.Pages
|
||||
|
||||
Value = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
HorizontalOptions = LayoutOptions.End,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
|
||||
@@ -418,6 +418,7 @@ namespace Bit.App.Pages
|
||||
|
||||
var label = new Label
|
||||
{
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label)),
|
||||
VerticalTextAlignment = TextAlignment.Center,
|
||||
VerticalOptions = LayoutOptions.CenterAndExpand,
|
||||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
|
||||
Reference in New Issue
Block a user