mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Fix icon image size to be adaptive on Large Font Size Accessibility which fixes row height on large vault (#1795)
This commit is contained in:
parent
04f4ad48f0
commit
23ca0f4b93
2 changed files with 12 additions and 6 deletions
|
@ -39,15 +39,16 @@
|
||||||
AutomationProperties.IsInAccessibleTree="False" />
|
AutomationProperties.IsInAccessibleTree="False" />
|
||||||
|
|
||||||
<ff:CachedImage
|
<ff:CachedImage
|
||||||
|
x:Name="_iconImage"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
BitmapOptimizations="True"
|
BitmapOptimizations="True"
|
||||||
ErrorPlaceholder="login.png"
|
ErrorPlaceholder="login.png"
|
||||||
LoadingPlaceholder="login.png"
|
LoadingPlaceholder="login.png"
|
||||||
HorizontalOptions="Fill"
|
HorizontalOptions="CenterAndExpand"
|
||||||
VerticalOptions="Fill"
|
VerticalOptions="CenterAndExpand"
|
||||||
Margin="9"
|
Margin="9"
|
||||||
MinimumWidthRequest="22"
|
WidthRequest="22"
|
||||||
MinimumHeightRequest="22"
|
HeightRequest="22"
|
||||||
Aspect="AspectFit"
|
Aspect="AspectFit"
|
||||||
IsVisible="{Binding ShowIconImage}"
|
IsVisible="{Binding ShowIconImage}"
|
||||||
Source="{Binding IconImageSource, Mode=OneTime}"
|
Source="{Binding IconImageSource, Mode=OneTime}"
|
||||||
|
|
|
@ -8,6 +8,9 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
public partial class CipherViewCell : ExtendedGrid
|
public partial class CipherViewCell : ExtendedGrid
|
||||||
{
|
{
|
||||||
|
private const int ICON_COLUMN_DEFAULT_WIDTH = 40;
|
||||||
|
private const int ICON_IMAGE_DEFAULT_WIDTH = 22;
|
||||||
|
|
||||||
public static readonly BindableProperty CipherProperty = BindableProperty.Create(
|
public static readonly BindableProperty CipherProperty = BindableProperty.Create(
|
||||||
nameof(Cipher), typeof(CipherView), typeof(CipherViewCell), default(CipherView), BindingMode.OneWay);
|
nameof(Cipher), typeof(CipherView), typeof(CipherViewCell), default(CipherView), BindingMode.OneWay);
|
||||||
|
|
||||||
|
@ -21,8 +24,10 @@ namespace Bit.App.Controls
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
var fontScale = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService").GetSystemFontSizeScale();
|
||||||
_iconColumn.Width = new GridLength(40 * deviceActionService.GetSystemFontSizeScale(), GridUnitType.Absolute);
|
_iconColumn.Width = new GridLength(ICON_COLUMN_DEFAULT_WIDTH * fontScale, GridUnitType.Absolute);
|
||||||
|
_iconImage.WidthRequest = ICON_IMAGE_DEFAULT_WIDTH * fontScale;
|
||||||
|
_iconImage.HeightRequest = ICON_IMAGE_DEFAULT_WIDTH * fontScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool? WebsiteIconsEnabled
|
public bool? WebsiteIconsEnabled
|
||||||
|
|
Loading…
Reference in a new issue