From b87338cbef8a409dba094bdd1876294481fb9cdc Mon Sep 17 00:00:00 2001 From: shmyga Date: Thu, 4 Apr 2019 20:41:26 +0300 Subject: [PATCH] [view] ImageView stretc true as default --- demo/src/demo/DemoView.yaml | 1 - demo/src/demo/form/TailForm.hx | 1 + src/main/haxework/view/ImageView.hx | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/src/demo/DemoView.yaml b/demo/src/demo/DemoView.yaml index 118b7de..02a3707 100644 --- a/demo/src/demo/DemoView.yaml +++ b/demo/src/demo/DemoView.yaml @@ -5,7 +5,6 @@ views: - $type: haxework.view.ImageView geometry.padding: 10 image: $r:image:logo - stretch: true - id: tabs $type: haxework.view.HGroupView layout.margin: 5 diff --git a/demo/src/demo/form/TailForm.hx b/demo/src/demo/form/TailForm.hx index f375782..0901b9a 100644 --- a/demo/src/demo/form/TailForm.hx +++ b/demo/src/demo/form/TailForm.hx @@ -12,6 +12,7 @@ import haxework.view.utils.DrawUtil.FillType; var view:IView; if (value.image != null) { var imageView = new ImageView(); + imageView.stretch = false; imageView.skinId = "border"; imageView.fillType = FillType.CONTAIN; imageView.imageUrl = value.image.url; diff --git a/src/main/haxework/view/ImageView.hx b/src/main/haxework/view/ImageView.hx index af1a0f6..bacaf32 100755 --- a/src/main/haxework/view/ImageView.hx +++ b/src/main/haxework/view/ImageView.hx @@ -13,7 +13,7 @@ class ImageView extends SpriteView { public var imageUrl(default, set):String; public var color(default, set):Int = -1; public var fillType(default, set):FillType; - public var stretch:Bool; + public var stretch:Bool = true; private var bitmapSkin:BitmapSkin = new BitmapSkin(); private var coloredImage:BitmapData;