summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:17:53 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-04 16:15:43 -0400
commit4bae5f1ab2154f7b01636d63f4de8019ec814161 (patch)
treecc3dbc833641f7c6b5b518fa02f1d8b780bc802e
parent6a6505106a0ee5b5d1cb5395db75d6a40ef1ddef (diff)
downloadefl-4bae5f1ab2154f7b01636d63f4de8019ec814161.tar.gz
elm_test: set window aspect hint for icon transparent test
-rw-r--r--src/bin/elementary/test_icon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/elementary/test_icon.c b/src/bin/elementary/test_icon.c
index 0b79b4c21f..832eebb209 100644
--- a/src/bin/elementary/test_icon.c
+++ b/src/bin/elementary/test_icon.c
@@ -129,6 +129,7 @@ test_icon_transparent(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
{
Evas_Object *win, *ic;
char buf[PATH_MAX];
+ int w, h;
win = elm_win_add(NULL, "icon-transparent", ELM_WIN_BASIC);
elm_win_title_set(win, "Icon Transparent");
@@ -138,6 +139,8 @@ test_icon_transparent(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
elm_image_file_set(ic, buf, NULL);
+ elm_image_object_size_get(ic, &w, &h);
+ evas_object_size_hint_aspect_set(win, EVAS_ASPECT_CONTROL_BOTH, w, h);
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
elm_image_no_scale_set(ic, EINA_TRUE);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);