mirror of
https://github.com/bitwarden/mobile
synced 2025-12-27 13:43:32 +00:00
Move to named sizes
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Bit.App.Controls
|
||||
{
|
||||
public EntryLabel()
|
||||
{
|
||||
FontSize = 14;
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label));
|
||||
TextColor = Color.FromHex("777777");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,18 @@ namespace Bit.App.Controls
|
||||
{
|
||||
public class FormEntryCell : ExtendedViewCell
|
||||
{
|
||||
public FormEntryCell(string labelText, Keyboard entryKeyboard = null, bool IsPassword = false, VisualElement nextElement = null)
|
||||
public FormEntryCell(string labelText, Keyboard entryKeyboard = null, bool IsPassword = false, VisualElement nextElement = null, bool useLabelAsPlaceholder = false)
|
||||
{
|
||||
Label = new Label
|
||||
if(!useLabelAsPlaceholder)
|
||||
{
|
||||
Text = labelText,
|
||||
FontSize = 14,
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
};
|
||||
Label = new Label
|
||||
{
|
||||
Text = labelText,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||
VerticalOptions = LayoutOptions.Start,
|
||||
Style = (Style)Application.Current.Resources["text-muted"]
|
||||
};
|
||||
}
|
||||
|
||||
Entry = new ExtendedEntry
|
||||
{
|
||||
@@ -23,6 +26,11 @@ namespace Bit.App.Controls
|
||||
IsPassword = IsPassword
|
||||
};
|
||||
|
||||
if(useLabelAsPlaceholder)
|
||||
{
|
||||
Entry.Placeholder = labelText;
|
||||
}
|
||||
|
||||
if(nextElement != null)
|
||||
{
|
||||
Entry.ReturnType = Enums.ReturnType.Next;
|
||||
@@ -34,7 +42,11 @@ namespace Bit.App.Controls
|
||||
Padding = new Thickness(15, 10)
|
||||
};
|
||||
|
||||
stackLayout.Children.Add(Label);
|
||||
if(!useLabelAsPlaceholder)
|
||||
{
|
||||
stackLayout.Children.Add(Label);
|
||||
}
|
||||
|
||||
stackLayout.Children.Add(Entry);
|
||||
|
||||
View = stackLayout;
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Bit.App.Controls
|
||||
Label = new Label
|
||||
{
|
||||
Text = labelText,
|
||||
FontSize = 14,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||
TextColor = Color.FromHex("777777"),
|
||||
VerticalOptions = LayoutOptions.Start
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Bit.App.Controls
|
||||
Label = new Label
|
||||
{
|
||||
Text = labelText,
|
||||
FontSize = 14,
|
||||
FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)),
|
||||
Style = (Style)Application.Current.Resources["text-muted"],
|
||||
VerticalOptions = LayoutOptions.Start
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user