mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-22 11:35:21 +01:00
padding option for form entry cell. increased padding on login and register forms. reduced large font size on iOS
This commit is contained in:
parent
7e6dbecfe3
commit
ec419a2306
@ -11,7 +11,8 @@ namespace Bit.App.Controls
|
||||
bool IsPassword = false,
|
||||
VisualElement nextElement = null,
|
||||
bool useLabelAsPlaceholder = false,
|
||||
string imageSource = null)
|
||||
string imageSource = null,
|
||||
Thickness? containerPadding = null)
|
||||
{
|
||||
if(!useLabelAsPlaceholder)
|
||||
{
|
||||
@ -48,7 +49,7 @@ namespace Bit.App.Controls
|
||||
|
||||
var imageStackLayout = new StackLayout
|
||||
{
|
||||
Padding = new Thickness(15, 10),
|
||||
Padding = containerPadding ?? new Thickness(15, 10),
|
||||
Orientation = StackOrientation.Horizontal,
|
||||
Spacing = 10,
|
||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||
|
@ -51,8 +51,7 @@ namespace Bit.App.Pages
|
||||
Command = new Command(async () => await RegisterAsync()),
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
Style = (Style)Application.Current.Resources["btn-primary"],
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||
Style = (Style)Application.Current.Resources["btn-primary"]
|
||||
};
|
||||
|
||||
var loginButton = new Button
|
||||
@ -61,8 +60,7 @@ namespace Bit.App.Pages
|
||||
Command = new Command(async () => await LoginAsync()),
|
||||
VerticalOptions = LayoutOptions.End,
|
||||
Style = (Style)Application.Current.Resources["btn-primaryAccent"],
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Label))
|
||||
HorizontalOptions = LayoutOptions.Fill
|
||||
};
|
||||
|
||||
var buttonStackLayout = new StackLayout
|
||||
|
@ -38,10 +38,13 @@ namespace Bit.App.Pages
|
||||
|
||||
private void Init()
|
||||
{
|
||||
var padding = new Thickness(15, 20);
|
||||
|
||||
PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
|
||||
useLabelAsPlaceholder: true, imageSource: "lock");
|
||||
useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
|
||||
EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: PasswordCell.Entry,
|
||||
entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope");
|
||||
entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope",
|
||||
containerPadding: padding);
|
||||
|
||||
PasswordCell.Entry.ReturnType = Enums.ReturnType.Go;
|
||||
PasswordCell.Entry.Completed += Entry_Completed;
|
||||
|
@ -34,11 +34,18 @@ namespace Bit.App.Pages
|
||||
|
||||
private void Init()
|
||||
{
|
||||
PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true, imageSource: "lightbulb-o");
|
||||
ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", IsPassword: true, nextElement: PasswordHintCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock");
|
||||
PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true, nextElement: ConfirmPasswordCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock");
|
||||
NameCell = new FormEntryCell("Your Name", nextElement: PasswordCell.Entry, useLabelAsPlaceholder: true, imageSource: "user");
|
||||
EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: NameCell.Entry, entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope");
|
||||
var padding = new Thickness(15, 20);
|
||||
|
||||
PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true,
|
||||
imageSource: "lightbulb-o", containerPadding: padding);
|
||||
ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", IsPassword: true,
|
||||
nextElement: PasswordHintCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
|
||||
PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
|
||||
nextElement: ConfirmPasswordCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
|
||||
NameCell = new FormEntryCell("Your Name", nextElement: PasswordCell.Entry,
|
||||
useLabelAsPlaceholder: true, imageSource: "user", containerPadding: padding);
|
||||
EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: NameCell.Entry,
|
||||
entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope", containerPadding: padding);
|
||||
|
||||
PasswordHintCell.Entry.ReturnType = Enums.ReturnType.Done;
|
||||
PasswordHintCell.Entry.Completed += Entry_Completed;
|
||||
|
@ -22,7 +22,7 @@ namespace Bit.iOS.Controls
|
||||
var size = view.FontSize;
|
||||
if(size == Device.GetNamedSize(NamedSize.Large, typeof(Button)))
|
||||
{
|
||||
pointSize *= 1.4f;
|
||||
pointSize *= 1.3f;
|
||||
}
|
||||
else if(size == Device.GetNamedSize(NamedSize.Small, typeof(Button)))
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ namespace Bit.iOS.Controls
|
||||
var size = view.FontSize;
|
||||
if(size == Device.GetNamedSize(NamedSize.Large, typeof(Label)))
|
||||
{
|
||||
pointSize *= 1.4f;
|
||||
pointSize *= 1.3f;
|
||||
}
|
||||
else if(size == Device.GetNamedSize(NamedSize.Small, typeof(Label)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user