Skip to content

Commit

Permalink
removed monospaced font from username field
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Nov 9, 2016
1 parent 3b1bb02 commit 0257c5b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/App/Controls/FormEntryCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class FormEntryCell : ExtendedViewCell
public FormEntryCell(
string labelText,
Keyboard entryKeyboard = null,
bool IsPassword = false,
bool isPassword = false,
VisualElement nextElement = null,
bool useLabelAsPlaceholder = false,
string imageSource = null,
Expand All @@ -32,7 +32,7 @@ public class FormEntryCell : ExtendedViewCell
{
Keyboard = entryKeyboard,
HasBorder = false,
IsPassword = IsPassword,
IsPassword = isPassword,
AllowClear = true,
HorizontalOptions = LayoutOptions.FillAndExpand,
WidthRequest = 1,
Expand Down
2 changes: 1 addition & 1 deletion src/App/Pages/Lock/LockPasswordPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void Init()
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));

PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);

PasswordCell.Entry.ReturnType = Enums.ReturnType.Go;
Expand Down
2 changes: 1 addition & 1 deletion src/App/Pages/LoginPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void Init()
Android: new Thickness(15, 8),
WinPhone: new Thickness(15, 20));

PasswordCell = new FormEntryCell(AppResources.MasterPassword, IsPassword: true,
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
useLabelAsPlaceholder: true, imageSource: "lock", containerPadding: padding);
EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: PasswordCell.Entry,
entryKeyboard: Keyboard.Email, useLabelAsPlaceholder: true, imageSource: "envelope",
Expand Down
4 changes: 2 additions & 2 deletions src/App/Pages/RegisterPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ private void Init()

PasswordHintCell = new FormEntryCell("Master Password Hint (optional)", useLabelAsPlaceholder: true,
imageSource: "lightbulb", containerPadding: padding);
ConfirmPasswordCell = new FormEntryCell("Re-type Master Password", IsPassword: true,
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,
PasswordCell = new FormEntryCell(AppResources.MasterPassword, isPassword: true,
nextElement: ConfirmPasswordCell.Entry, useLabelAsPlaceholder: true, imageSource: "lock",
containerPadding: padding);
EmailCell = new FormEntryCell(AppResources.EmailAddress, nextElement: PasswordCell.Entry,
Expand Down
6 changes: 2 additions & 4 deletions src/App/Pages/Vault/VaultAddSitePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,18 @@ public VaultAddSitePage()
private void Init()
{
var notesCell = new FormEditorCell(height: 90);
PasswordCell = new FormEntryCell(AppResources.Password, IsPassword: true, nextElement: notesCell.Editor,
PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: notesCell.Editor,
useButton: true);
PasswordCell.Button.Image = "eye";
PasswordCell.Button.Clicked += PasswordButton_Clicked;
PasswordCell.Entry.DisableAutocapitalize = true;
PasswordCell.Entry.Autocorrect = false;
PasswordCell.Entry.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");

var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
usernameCell.Entry.DisableAutocapitalize = true;
usernameCell.Entry.Autocorrect = false;

usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily = Device.OnPlatform(
iOS: "Courier", Android: "monospace", WinPhone: "Courier");

var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url, nextElement: usernameCell.Entry);
var nameCell = new FormEntryCell(AppResources.Name, nextElement: uriCell.Entry);

Expand Down
6 changes: 2 additions & 4 deletions src/App/Pages/Vault/VaultEditSitePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,20 @@ private void Init()
var notesCell = new FormEditorCell(height: 90);
notesCell.Editor.Text = site.Notes?.Decrypt();

PasswordCell = new FormEntryCell(AppResources.Password, IsPassword: true, nextElement: notesCell.Editor,
PasswordCell = new FormEntryCell(AppResources.Password, isPassword: true, nextElement: notesCell.Editor,
useButton: true);
PasswordCell.Entry.Text = site.Password?.Decrypt();
PasswordCell.Button.Image = "eye";
PasswordCell.Button.Clicked += PasswordButton_Clicked;
PasswordCell.Entry.DisableAutocapitalize = true;
PasswordCell.Entry.Autocorrect = false;
PasswordCell.Entry.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");

var usernameCell = new FormEntryCell(AppResources.Username, nextElement: PasswordCell.Entry);
usernameCell.Entry.Text = site.Username?.Decrypt();
usernameCell.Entry.DisableAutocapitalize = true;
usernameCell.Entry.Autocorrect = false;

usernameCell.Entry.FontFamily = PasswordCell.Entry.FontFamily =
Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");

var uriCell = new FormEntryCell(AppResources.URI, Keyboard.Url, nextElement: usernameCell.Entry);
uriCell.Entry.Text = site.Uri?.Decrypt();
var nameCell = new FormEntryCell(AppResources.Name, nextElement: uriCell.Entry);
Expand Down
4 changes: 1 addition & 3 deletions src/App/Pages/Vault/VaultViewSitePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ private void Init()
}
PasswordCell.Button1.Command = new Command(() => Model.RevealPassword = !Model.RevealPassword);
PasswordCell.Button2.Command = new Command(() => Copy(Model.Password, AppResources.Password));

UsernameCell.Value.FontFamily = PasswordCell.Value.FontFamily = Device.OnPlatform(
iOS: "Courier", Android: "monospace", WinPhone: "Courier");
PasswordCell.Value.FontFamily = Device.OnPlatform(iOS: "Courier", Android: "monospace", WinPhone: "Courier");

// URI
UriCell = new LabeledValueCell(AppResources.Website, button1Text: AppResources.Launch);
Expand Down

0 comments on commit 0257c5b

Please sign in to comment.