diff options
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs b/Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs index 7bee5c8a..2bf64b4c 100644 --- a/Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs +++ b/Xamarin.Forms.Platform.Tizen/Cells/ImageCellRenderer.cs @@ -5,7 +5,7 @@ namespace Xamarin.Forms.Platform.Tizen { public class ImageCellRenderer : TextCellRenderer { - const int _defaultHeight = 100; + const int _defaultHeight = 55; Dictionary<EvasObject, Native.Image> _realizedViews = new Dictionary<EvasObject, Native.Image>(); public ImageCellRenderer() : this("type1") @@ -21,16 +21,16 @@ namespace Xamarin.Forms.Platform.Tizen if (part == ImagePart) { var imgCell = cell as ImageCell; - var size = imgCell.RenderHeight; - if (size <= 0) + int pixelSize = Forms.ConvertToScaledPixel(imgCell.RenderHeight); + if (pixelSize <= 0) { - size = _defaultHeight; + pixelSize = Forms.ConvertToPixel(_defaultHeight); } var image = new Native.Image(Forms.Context.MainWindow) { - MinimumWidth = (int)size, - MinimumHeight = (int)size + MinimumWidth = pixelSize, + MinimumHeight = pixelSize }; image.SetAlignment(-1.0, -1.0); // fill image.SetWeight(1.0, 1.0); // expand |