forked from enlightenment/efl
elm_filselector: don't force the icon size
A icon in the files view, mode grid, should not apply size bigger then
swallow for it. This commit additional fix for
52ddf9331a
This commit is contained in:
parent
c65782b15c
commit
c4e7d611d6
|
@ -312,13 +312,10 @@ _itc_icon_folder_get(void *data EINA_UNUSED,
|
|||
Evas_Object *obj,
|
||||
const char *source)
|
||||
{
|
||||
Evas_Object *ic, *grid, *f;
|
||||
Evas_Object *ic, *grid;
|
||||
|
||||
if (strcmp(source, "elm.swallow.icon")) return NULL;
|
||||
|
||||
f = evas_object_data_get(obj, "parent");
|
||||
ELM_FILESELECTOR_DATA_GET(f, sd);
|
||||
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_standard_set(ic, "folder");
|
||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||
|
@ -327,7 +324,6 @@ _itc_icon_folder_get(void *data EINA_UNUSED,
|
|||
grid = elm_grid_add(obj);
|
||||
elm_grid_size_set(grid, 1, 1);
|
||||
elm_grid_pack(grid, ic, 0, 0, 1, 1);
|
||||
evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
|
||||
evas_object_show(grid);
|
||||
|
||||
return grid;
|
||||
|
@ -339,13 +335,10 @@ _itc_icon_image_get(void *data,
|
|||
const char *source)
|
||||
{
|
||||
Elm_Fileselector_Item_Data *it_data = data;
|
||||
Evas_Object *ic, *grid, *f;
|
||||
Evas_Object *ic, *grid;
|
||||
|
||||
if (strcmp(source, "elm.swallow.icon")) return NULL;
|
||||
|
||||
f = evas_object_data_get(obj, "parent");
|
||||
ELM_FILESELECTOR_DATA_GET(f, sd);
|
||||
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_standard_set(ic, "image");
|
||||
// FIXME: maybe use Efl.Model.connect
|
||||
|
@ -356,7 +349,6 @@ _itc_icon_image_get(void *data,
|
|||
grid = elm_grid_add(obj);
|
||||
elm_grid_size_set(grid, 1, 1);
|
||||
elm_grid_pack(grid, ic, 0, 0, 1, 1);
|
||||
evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
|
||||
evas_object_show(grid);
|
||||
|
||||
return grid;
|
||||
|
@ -367,13 +359,10 @@ _itc_icon_file_get(void *data EINA_UNUSED,
|
|||
Evas_Object *obj,
|
||||
const char *source)
|
||||
{
|
||||
Evas_Object *ic, *grid, *f;
|
||||
Evas_Object *ic, *grid;
|
||||
|
||||
if (strcmp(source, "elm.swallow.icon")) return NULL;
|
||||
|
||||
f = evas_object_data_get(obj, "parent");
|
||||
ELM_FILESELECTOR_DATA_GET(f, sd);
|
||||
|
||||
ic = elm_icon_add(obj);
|
||||
elm_icon_standard_set(ic, "file");
|
||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||
|
@ -382,7 +371,6 @@ _itc_icon_file_get(void *data EINA_UNUSED,
|
|||
grid = elm_grid_add(obj);
|
||||
elm_grid_size_set(grid, 1, 1);
|
||||
elm_grid_pack(grid, ic, 0, 0, 1, 1);
|
||||
evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
|
||||
evas_object_show(grid);
|
||||
|
||||
return grid;
|
||||
|
|
Loading…
Reference in New Issue