This commit is contained in:
Javier Suárez 2023-06-02 19:01:07 +02:00
Родитель 2d4cc8fa5a
Коммит 62a97aad99
2 изменённых файлов: 14 добавлений и 12 удалений

Просмотреть файл

@ -20,17 +20,19 @@ namespace Microsoft.Maui.Graphics.Controls
ImeOptions = ImeAction.Done
};
platformView.SetSingleLine(false);
platformView.Gravity = GravityFlags.Top;
platformView.TextAlignment = ATextAlignment.ViewStart;
platformView.SetHorizontallyScrolling(false);
platformView.SetSingleLine(false);
platformView.Gravity = GravityFlags.Top;
platformView.TextAlignment = ATextAlignment.ViewStart;
platformView.SetHorizontallyScrolling(false);
var density = platformView.Resources?.DisplayMetrics?.Density ?? 1.0f;
if (Drawable is MaterialEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 24), 0, 0);
else if (Drawable is FluentEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
else if (Drawable is CupertinoEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
if (Drawable is MaterialEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 24), 0, 0);
else if (Drawable is FluentEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
else if (Drawable is CupertinoEditorDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
return platformView;
}

Просмотреть файл

@ -22,7 +22,7 @@ namespace Microsoft.Maui.Graphics.Controls
{
GraphicsControl = this
};
var density = platformView.Resources?.DisplayMetrics?.Density ?? 1.0f;
if (Drawable is MaterialEntryDrawable)
@ -31,7 +31,7 @@ namespace Microsoft.Maui.Graphics.Controls
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
else if (Drawable is CupertinoEntryDrawable)
platformView.SetPadding((int)(density * 12), (int)(density * 12), 0, 0);
return platformView;
}