mirror of
https://github.com/bitwarden/mobile
synced 2026-01-05 18:13:36 +00:00
Added Scale to device info service. Stack layout padding adjsutments depending on android scale.
This commit is contained in:
@@ -28,6 +28,7 @@ namespace Bit.App.Controls
|
||||
|
||||
Tapped += FormEditorCell_Tapped;
|
||||
Editor.AdjustMarginsForDevice();
|
||||
stackLayout.AdjustPaddingForDevice();
|
||||
|
||||
View = stackLayout;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Bit.App.Controls
|
||||
{
|
||||
if(deviceInfo.Version < 21)
|
||||
{
|
||||
Entry.Margin = new Thickness(-9, 0);
|
||||
Entry.Margin = new Thickness(-9, 1, -9, 0);
|
||||
}
|
||||
else if(deviceInfo.Version == 21)
|
||||
{
|
||||
@@ -97,6 +97,11 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Entry.AdjustMarginsForDevice();
|
||||
}
|
||||
|
||||
if(containerPadding == null)
|
||||
{
|
||||
imageStackLayout.AdjustPaddingForDevice();
|
||||
}
|
||||
}
|
||||
|
||||
if(!useLabelAsPlaceholder)
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Bit.App.Controls
|
||||
stackLayout.Spacing = 0;
|
||||
}
|
||||
Picker.AdjustMarginsForDevice();
|
||||
stackLayout.AdjustPaddingForDevice();
|
||||
|
||||
Tapped += FormPickerCell_Tapped;
|
||||
|
||||
|
||||
@@ -92,6 +92,9 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Button2.Padding = new Thickness(5);
|
||||
}
|
||||
|
||||
|
||||
containerStackLayout.AdjustPaddingForDevice();
|
||||
}
|
||||
|
||||
containerStackLayout.Children.Add(buttonStackLayout);
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Label.TextColor = Color.Black;
|
||||
}
|
||||
stackLayout.AdjustPaddingForDevice();
|
||||
|
||||
View = stackLayout;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user