elfe: Add config option to give all icons the thame size (72px by default)
SVN revision: 57853
This commit is contained in:
parent
45895ae861
commit
6f42891e7c
|
@ -934,7 +934,6 @@ collections
|
|||
clip_to: "clip";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
max: 72 72;
|
||||
align: 0.5 0.8;
|
||||
aspect: 1 1;
|
||||
aspect_preference: BOTH;
|
||||
|
|
|
@ -725,8 +725,8 @@ group { name: "elm/gengrid/item/default/default";
|
|||
description {
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 0;
|
||||
rel1.offset: 16 16;
|
||||
rel2.offset: -15 -15;
|
||||
//rel1.offset: 16 16;
|
||||
//rel2.offset: -15 -15;
|
||||
}
|
||||
}
|
||||
part { name: "bg";
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
x-ui.sh --profile=illume-home --screen=480x800 --dpi=140
|
||||
x-ui.sh --profile=illume-home --screen=320x480
|
|
@ -64,6 +64,8 @@ _icon_get(void *data, Evas_Object *obj, const char *part)
|
|||
elm_icon_file_set(ic, gitem->icon_path, NULL);
|
||||
else
|
||||
elm_icon_file_set(ic, elfe_home_cfg->theme, gitem->icon_path);
|
||||
evas_object_size_hint_min_set(ic, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
|
||||
evas_object_size_hint_max_set(ic, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
|
||||
}
|
||||
|
||||
return ic;
|
||||
|
@ -136,7 +138,7 @@ _add_items(Elfe_Allapps *allapps, Efreet_Menu *entry)
|
|||
case EFREET_MENU_ENTRY_DESKTOP :
|
||||
gitem = calloc(1, sizeof(Elfe_Grid_Item));
|
||||
gitem->allapps = allapps;
|
||||
gitem->icon_path = elfe_utils_fdo_icon_path_get(it, 72);
|
||||
gitem->icon_path = elfe_utils_fdo_icon_path_get(it, elfe_home_cfg->icon_size);
|
||||
if (!gitem->icon_path)
|
||||
gitem->icon_path = eina_stringshare_add("icon/application-default");
|
||||
gitem->menu = it;
|
||||
|
@ -154,15 +156,18 @@ _obj_resize_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
|||
Evas_Coord w, h;
|
||||
Evas_Coord size = 0;
|
||||
Elfe_Allapps *allapps = data;
|
||||
Evas_Coord ow, oh;
|
||||
|
||||
evas_object_geometry_get(allapps->box, NULL, NULL, &w, &h);
|
||||
|
||||
(h > w) ? (size = w / 4) : (size = h / 4);
|
||||
ow = w / (elfe_home_cfg->icon_size + w / 10);
|
||||
|
||||
printf("Nb elements : ow %d\n", ow);
|
||||
|
||||
elm_gengrid_item_size_set(allapps->grid, w / ow, (w /ow) + 20);
|
||||
|
||||
elm_gengrid_align_set(allapps->grid, 0.5, 0);
|
||||
|
||||
elm_gengrid_item_size_set(allapps->grid, size, size*1.1);
|
||||
double x, y;
|
||||
elm_gengrid_align_get(allapps->grid, &x, &y);
|
||||
printf("Align : %3.3f, %3.3f\n", x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -96,10 +96,14 @@ _app_add(Elfe_Desktop_Item *dit, const char *name)
|
|||
item = edje_object_add(evas_object_evas_get(dit->frame));
|
||||
edje_object_file_set(item, elfe_home_cfg->theme, "elfe/desktop/app/frame");
|
||||
|
||||
icon = elfe_utils_fdo_icon_add(dit->frame, dit->desktop->icon, 96);
|
||||
icon = elfe_utils_fdo_icon_add(dit->frame, dit->desktop->icon, elfe_home_cfg->icon_size);
|
||||
evas_object_size_hint_min_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
|
||||
evas_object_size_hint_max_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
|
||||
|
||||
edje_object_part_swallow(item, "elfe.swallow.content", icon);
|
||||
dit->icon = icon;
|
||||
|
||||
|
||||
edje_object_part_text_set(item, "elfe.text.label", dit->desktop->name);
|
||||
edje_object_signal_callback_add(item, "mouse,clicked,1", "*", _clicked_signal_cb, dit);
|
||||
|
||||
|
|
|
@ -58,16 +58,17 @@ elfe_home_config_init(E_Module *m)
|
|||
E_CONFIG_LIST(D, T, desktops, conf_desktop_edd);
|
||||
E_CONFIG_VAL(D, T, cols, INT);
|
||||
E_CONFIG_VAL(D, T, rows, INT);
|
||||
E_CONFIG_VAL(D, T, icon_size, INT);
|
||||
|
||||
elfe_home_cfg = e_config_domain_load("module.elfe", conf_edd);
|
||||
|
||||
|
||||
if (!elfe_home_cfg)
|
||||
{
|
||||
int i;
|
||||
elfe_home_cfg = E_NEW(Elfe_Home_Config, 1);
|
||||
elfe_home_cfg->cols = 4;
|
||||
elfe_home_cfg->rows = 4;
|
||||
elfe_home_cfg->icon_size = 72;
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
Elfe_Desktop_Config *dc;
|
||||
|
@ -81,6 +82,8 @@ elfe_home_config_init(E_Module *m)
|
|||
elfe_home_cfg->cols = 4;
|
||||
if (!elfe_home_cfg->rows)
|
||||
elfe_home_cfg->rows = 4;
|
||||
if (!elfe_home_cfg->icon_size)
|
||||
elfe_home_cfg->icon_size = 72;
|
||||
|
||||
elfe_home_cfg->mod_dir = eina_stringshare_add(m->dir);
|
||||
elfe_home_cfg->theme = eina_stringshare_printf("%s/default.edj", elfe_home_cfg->mod_dir);
|
||||
|
|
|
@ -22,6 +22,7 @@ struct _Elfe_Home_Config
|
|||
const char *theme;
|
||||
int cols;
|
||||
int rows;
|
||||
int icon_size;
|
||||
};
|
||||
|
||||
struct _Elfe_Desktop_Config
|
||||
|
|
Loading…
Reference in New Issue