forked from enlightenment/efl
elm_test: set window aspect hint for icon transparent test
This commit is contained in:
parent
6a6505106a
commit
4bae5f1ab2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue