forked from enlightenment/enlightenment
- being icon overhaul
- icons look bad for now, until everthing is fixed. SVN revision: 18262
This commit is contained in:
parent
8cc34a820a
commit
8451bbda11
|
@ -918,135 +918,133 @@ group {
|
|||
|
||||
group {
|
||||
name: "fileman/icon_normal";
|
||||
min: 48 48;
|
||||
max: 128 9999;
|
||||
parts {
|
||||
part {
|
||||
/* this is used for debugging */
|
||||
name: "ghost";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
color: 128 128 128 128;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_swallow";
|
||||
type: SWALLOW;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 48 48;
|
||||
max: 48 48;
|
||||
align: 0.5 0.0;
|
||||
state: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_overlay";
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
image {
|
||||
normal: "e17_button.png";
|
||||
}
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
description {
|
||||
state: "clicked" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_title";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
fixed: 1 1;
|
||||
align: 0.5 0.0;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_swallow";
|
||||
relative: 0.0 1.0;
|
||||
offset: 1 -1;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_swallow";
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "clicked" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_event";
|
||||
type: RECT;
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
part {
|
||||
name: "icon_title";
|
||||
type: TEXTBLOCK;
|
||||
effect: NONE;
|
||||
description {
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 5 -20;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -6 1000;
|
||||
}
|
||||
color: 0 0 0 255;
|
||||
//color3: 0 0 0 32;
|
||||
text {
|
||||
text: "No Title";
|
||||
style: "fileman_icon_style";
|
||||
min: 1 1;
|
||||
parts {
|
||||
part {
|
||||
name: "icon_box";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 1;
|
||||
color: 128 128 128 128;
|
||||
aspect: 1.0 1.0;
|
||||
color: 0 0 0 0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
to_y: "icon_title";
|
||||
relative: 1.0 0.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
part {
|
||||
name: "icon_title_edit_swallow";
|
||||
type: SWALLOW;
|
||||
effect: NONE;
|
||||
description {
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 5 -20;
|
||||
part {
|
||||
name: "icon_swallow";
|
||||
type: SWALLOW;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
fixed: 1 1;
|
||||
rel1 {
|
||||
to: "icon_box";
|
||||
relative: 0.0 0.0;
|
||||
offset: 2 2;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_box";
|
||||
relative: 1.0 1.0;
|
||||
offset: -3 -3;
|
||||
}
|
||||
}
|
||||
rel2 {
|
||||
}
|
||||
part {
|
||||
name: "icon_title";
|
||||
type: TEXT;
|
||||
effect: SHADOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
align: 0.5 1.0;
|
||||
fixed: 0 1;
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 0 -1;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
|
||||
color: 0 0 0 255;
|
||||
color3: 255 255 255 128;
|
||||
text {
|
||||
text: "No Title";
|
||||
align: 0.0 0.0;
|
||||
size: 10;
|
||||
font: "Vera";
|
||||
min: 0 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_overlay";
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
image {
|
||||
normal: "e17_button.png";
|
||||
}
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
description {
|
||||
state: "clicked" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_event";
|
||||
type: RECT;
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_title_edit_swallow";
|
||||
type: SWALLOW;
|
||||
effect: NONE;
|
||||
description {
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 5 -20;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -6 -6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
name: "clicked";
|
||||
|
@ -1154,248 +1152,6 @@ group {
|
|||
}
|
||||
}
|
||||
|
||||
group {
|
||||
name: "fileman/icon_thumb_normal2";
|
||||
min: 48 48;
|
||||
max: 128 9999;
|
||||
parts {
|
||||
part {
|
||||
/* this is used for debugging */
|
||||
name: "ghost";
|
||||
type: RECT;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
color: 128 128 128 128;
|
||||
}
|
||||
}
|
||||
/*
|
||||
part {
|
||||
name: "icon_bg";
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 48 48;
|
||||
max: 48 48;
|
||||
align: 0.5 0.0;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_swallow";
|
||||
offset: 5 5;
|
||||
}
|
||||
image {
|
||||
normal: "e17_fileman_thumb_bg.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
part {
|
||||
name: "icon_box_shadow";
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 56 56;
|
||||
max: 56 56;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_box";
|
||||
relative: 0.0 0.0;
|
||||
offset: 2 2;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_box";
|
||||
relative: 1.0 1.0;
|
||||
offset: 3 3;
|
||||
}
|
||||
image {
|
||||
normal: "e17_mini_button_shadow2.png";
|
||||
border: 6 6 6 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_box";
|
||||
type: RECT;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 52 52;
|
||||
max: 52 52;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_swallow";
|
||||
relative: 0.0 0.0;
|
||||
offset: -2 -2;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_swallow";
|
||||
relative: 1.0 1.0;
|
||||
offset: 2 2;
|
||||
}
|
||||
color: 0 0 0 255;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_box_bg";
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 50 50;
|
||||
max: 50 50;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_swallow";
|
||||
relative: 0.0 0.0;
|
||||
offset: -1 -1;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_swallow";
|
||||
relative: 1.0 1.0;
|
||||
offset: 1 1;
|
||||
}
|
||||
image {
|
||||
normal: "e17_fileman_thumb_bg.png";
|
||||
}
|
||||
fill {
|
||||
smooth: 0;
|
||||
size {
|
||||
relative: 0 0;
|
||||
offset: 32 32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_swallow";
|
||||
type: SWALLOW;
|
||||
mouse_events: 0;
|
||||
description {
|
||||
min: 48 48;
|
||||
max: 48 48;
|
||||
align: 0.5 0.0;
|
||||
state: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_overlay";
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
visible: 0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: -3 -4;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: 3 6;
|
||||
}
|
||||
image {
|
||||
normal: "e17_button.png";
|
||||
}
|
||||
color: 255 255 255 128;
|
||||
}
|
||||
description {
|
||||
state: "clicked" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
visible: 1;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_title";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
fixed: 1 1;
|
||||
align: 0.5 0.0;
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
to: "icon_box";
|
||||
relative: 0.0 1.0;
|
||||
offset: 1 2;
|
||||
}
|
||||
rel2 {
|
||||
to: "icon_box";
|
||||
relative: 1.0 1.0;
|
||||
offset: -1 2;
|
||||
}
|
||||
}
|
||||
description {
|
||||
state: "clicked" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "icon_event";
|
||||
type: RECT;
|
||||
mouse_events: 1;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.0 0.0;
|
||||
offset: -3 -4;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: 3 6;
|
||||
}
|
||||
color: 0 0 0 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
part {
|
||||
name: "icon_title";
|
||||
type: TEXTBLOCK;
|
||||
effect: NONE;
|
||||
description {
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 5 -20;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -6 1000;
|
||||
}
|
||||
color: 0 0 0 255;
|
||||
//color3: 0 0 0 32;
|
||||
text {
|
||||
text: "No Title";
|
||||
style: "fileman_icon_style";
|
||||
min: 1 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
part {
|
||||
name: "icon_title_edit_swallow";
|
||||
type: SWALLOW;
|
||||
effect: NONE;
|
||||
description {
|
||||
rel1 {
|
||||
relative: 0.0 1.0;
|
||||
offset: 5 -20;
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 1.0;
|
||||
offset: -6 -6;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
programs {
|
||||
program {
|
||||
name: "clicked";
|
||||
signal: "clicked";
|
||||
source: "";
|
||||
action: STATE_SET "clicked" 0.0;
|
||||
target: "icon_title";
|
||||
target: "icon_overlay";
|
||||
}
|
||||
program {
|
||||
name: "unclicked";
|
||||
signal: "unclicked";
|
||||
source: "";
|
||||
action: STATE_SET "default" 0.0;
|
||||
target: "icon_title";
|
||||
target: "icon_overlay";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group {
|
||||
name: "fileman/icon_list";
|
||||
|
@ -1408,8 +1164,8 @@ group {
|
|||
mouse_events: 0;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 16 16;
|
||||
max: 16 16;
|
||||
//min: 16 16;
|
||||
//max: 16 16;
|
||||
align: 1.0 1.0;
|
||||
fixed: 1 1;
|
||||
rel1 {
|
||||
|
@ -1428,7 +1184,7 @@ group {
|
|||
effect: SHADOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 16 16;
|
||||
//min: 16 16;
|
||||
rel1 {
|
||||
to_x: "icon_swallow";
|
||||
relative: 1.0 0.0;
|
||||
|
@ -1610,3 +1366,4 @@ FULL_SIZE_FILEMAN_BUTTON("refresh");
|
|||
FULL_SIZE_FILEMAN_BUTTON("view_details");
|
||||
FULL_SIZE_FILEMAN_BUTTON("view_name");
|
||||
FULL_SIZE_FILEMAN_BUTTON("view");
|
||||
|
||||
|
|
|
@ -136,11 +136,13 @@ e_fm_icon_file_set(Evas_Object *obj, E_Fm_File *file)
|
|||
sd->thumb_object = e_thumb_evas_object_get(sd->file->path,
|
||||
sd->evas,
|
||||
sd->iw,
|
||||
sd->ih);
|
||||
sd->ih,
|
||||
1);
|
||||
evas_object_smart_member_add(sd->thumb_object, sd->obj);
|
||||
|
||||
sd->image_object = edje_object_add(sd->evas);
|
||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
||||
"fileman/icon_thumb");
|
||||
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
||||
|
@ -160,7 +162,8 @@ e_fm_icon_file_set(Evas_Object *obj, E_Fm_File *file)
|
|||
|
||||
_e_fm_icon_type_set(sd);
|
||||
|
||||
//edje_object_size_min_calc(sd->icon_object, &icon_w, &icon_h);
|
||||
edje_object_size_min_calc(sd->icon_object, &icon_w, &icon_h);
|
||||
printf("INTERNAL SIZE: %d %d\n", icon_w, icon_h);
|
||||
//evas_object_resize(sd->icon_object, icon_w, icon_h);
|
||||
//evas_object_resize(sd->event_object, icon_w, icon_h);
|
||||
//evas_object_resize(sd->obj, icon_w, icon_h);
|
||||
|
@ -179,6 +182,7 @@ e_fm_icon_title_set(Evas_Object *obj, const char *title)
|
|||
//if (sd->icon_object) edje_object_part_text_set(sd->icon_object, "icon_title", title);
|
||||
if(sd->icon_object)
|
||||
{
|
||||
#if 0
|
||||
Evas_Textblock_Style *e_editable_text_style;
|
||||
Evas_Coord fw, fh, il, ir, it, ib;
|
||||
|
||||
|
@ -187,7 +191,7 @@ e_fm_icon_title_set(Evas_Object *obj, const char *title)
|
|||
|
||||
|
||||
evas_object_textblock_style_set(sd->title_object, e_editable_text_style);
|
||||
evas_object_textblock_text_markup_set(sd->title_object, sd->file->name);
|
||||
evas_object_textblock_text_markup_set(sd->title_object, title);
|
||||
|
||||
evas_object_resize(sd->title_object, sd->w, 1);
|
||||
evas_object_textblock_size_formatted_get(sd->title_object, &fw, &fh);
|
||||
|
@ -200,6 +204,8 @@ e_fm_icon_title_set(Evas_Object *obj, const char *title)
|
|||
evas_object_resize(sd->icon_object, sd->w, sd->h);
|
||||
evas_object_resize(sd->obj, sd->w, sd->h);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_title", sd->title_object);
|
||||
#endif
|
||||
edje_object_part_text_set(sd->icon_object, "icon_title", title);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +259,16 @@ e_fm_icon_image_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
|||
sd->ih = h;
|
||||
evas_object_resize(sd->image_object, w, h);
|
||||
}
|
||||
|
||||
void
|
||||
e_fm_icon_size_min_calc(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if (!sd) return;
|
||||
edje_object_size_min_calc(sd->icon_object, w, h);
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
|
@ -361,7 +376,7 @@ _e_fm_icon_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
|
|||
|
||||
evas_object_resize(sd->event_object, sd->w, sd->h);
|
||||
if (sd->icon_object) evas_object_resize(sd->icon_object, sd->w, sd->h);
|
||||
|
||||
printf("resize to %d %d\n", sd->w, sd->h);
|
||||
//if (sd->image_object) evas_object_resize(sd->image_object, w, h);
|
||||
}
|
||||
|
||||
|
@ -417,12 +432,13 @@ _e_fm_icon_icon_mime_get(E_Smart_Data *sd)
|
|||
|
||||
if (!e_theme_edje_object_set(sd->image_object, "base/theme/fileman", part))
|
||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
||||
|
||||
|
||||
free(ext);
|
||||
}
|
||||
else
|
||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman", "icons/fileman/file");
|
||||
}
|
||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -473,19 +489,21 @@ _e_fm_icon_thumb_cb_exe_exit(void *data, int type, void *event)
|
|||
sd->thumb_object = e_thumb_evas_object_get(sd->file->path,
|
||||
sd->evas,
|
||||
sd->iw,
|
||||
sd->ih);
|
||||
sd->ih,
|
||||
1);
|
||||
evas_object_smart_member_add(sd->thumb_object, sd->obj);
|
||||
|
||||
sd->image_object = edje_object_add(sd->evas);
|
||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
e_theme_edje_object_set(sd->image_object, "base/theme/fileman",
|
||||
"fileman/icon_thumb");
|
||||
edje_object_part_swallow(sd->image_object, "icon_swallow",
|
||||
sd->thumb_object);
|
||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_swallow",
|
||||
sd->image_object);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_title",
|
||||
sd->title_object);
|
||||
// edje_object_part_swallow(sd->icon_object, "icon_title",
|
||||
// sd->title_object);
|
||||
}
|
||||
|
||||
pid = -1;
|
||||
|
@ -516,6 +534,8 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
|||
|
||||
if (sd->image_object)
|
||||
{
|
||||
edje_extern_object_min_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
edje_extern_object_max_size_set(sd->image_object, sd->iw, sd->ih);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_swallow", sd->image_object);
|
||||
evas_object_smart_member_add(sd->image_object, sd->obj);
|
||||
evas_object_show(sd->image_object);
|
||||
|
@ -523,6 +543,7 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
|||
|
||||
if(sd->saved_title)
|
||||
{
|
||||
#if 0
|
||||
Evas_Textblock_Style *e_editable_text_style;
|
||||
Evas_Coord fw, fh, il, ir, it, ib;
|
||||
|
||||
|
@ -531,7 +552,7 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
|||
|
||||
|
||||
evas_object_textblock_style_set(sd->title_object, e_editable_text_style);
|
||||
evas_object_textblock_text_markup_set(sd->title_object, sd->file->name);
|
||||
evas_object_textblock_text_markup_set(sd->title_object, sd->saved_title);
|
||||
|
||||
evas_object_resize(sd->title_object, sd->w, 1);
|
||||
evas_object_textblock_size_formatted_get(sd->title_object, &fw, &fh);
|
||||
|
@ -544,9 +565,12 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
|||
evas_object_resize(sd->icon_object, sd->w, sd->h);
|
||||
evas_object_resize(sd->obj, sd->w, sd->h);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_title", sd->title_object);
|
||||
#endif
|
||||
edje_object_part_text_set(sd->icon_object, "icon_title", sd->saved_title);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
Evas_Textblock_Style *e_editable_text_style;
|
||||
Evas_Coord fw, fh, il, ir, it, ib;
|
||||
|
||||
|
@ -568,5 +592,7 @@ _e_fm_icon_type_set(E_Smart_Data *sd)
|
|||
evas_object_resize(sd->icon_object, sd->w, sd->h);
|
||||
evas_object_resize(sd->obj, sd->w, sd->h);
|
||||
edje_object_part_swallow(sd->icon_object, "icon_title", sd->title_object);
|
||||
#endif
|
||||
edje_object_part_text_set(sd->icon_object, "icon_title", sd->file->name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ EAPI void e_fm_icon_type_set(Evas_Object *obj, int type);
|
|||
EAPI void e_fm_icon_edit_entry_set(Evas_Object *obj, Evas_Object *entry);
|
||||
EAPI void e_fm_icon_signal_emit(Evas_Object *obj, const char *source, const char *emission);
|
||||
EAPI void e_fm_icon_image_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
|
||||
EAPI void e_fm_icon_size_min_calc(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1378,6 +1378,7 @@ _e_fm_dir_set(E_Fm_Smart_Data *sd, const char *dir)
|
|||
icon = E_NEW(E_Fm_Icon, 1);
|
||||
if (icon)
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
snprintf(path, sizeof(path), "%s/..", sd->dir);
|
||||
icon->file = e_fm_file_new(path);
|
||||
icon->file->mode = 0040000;
|
||||
|
@ -1385,6 +1386,8 @@ _e_fm_dir_set(E_Fm_Smart_Data *sd, const char *dir)
|
|||
icon->icon_object = e_fm_icon_add(sd->evas);
|
||||
icon->sd = sd;
|
||||
e_fm_icon_file_set(icon->icon_object, icon->file);
|
||||
e_fm_icon_size_min_calc(icon->icon_object, &w, &h);
|
||||
evas_object_resize(icon->icon_object, 64, 64);
|
||||
sd->files = evas_list_prepend(sd->files, icon);
|
||||
}
|
||||
}
|
||||
|
@ -1399,8 +1402,8 @@ _e_fm_dir_set(E_Fm_Smart_Data *sd, const char *dir)
|
|||
|
||||
icon = l->data;
|
||||
|
||||
//evas_object_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
e_fm_icon_image_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
evas_object_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
//e_fm_icon_image_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
evas_object_show(icon->icon_object);
|
||||
evas_object_geometry_get(icon->icon_object, NULL, NULL, &icon_w, &icon_h);
|
||||
D(("_e_fm_dir_set: Icon, w=%d h=%d\n", icon_w, icon_h));
|
||||
|
@ -1478,6 +1481,9 @@ _e_fm_dir_files_get(E_Fm_Smart_Data *sd, int type)
|
|||
icon->sd = sd;
|
||||
e_fm_icon_file_set(icon->icon_object, icon->file);
|
||||
e_fm_icon_image_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
e_fm_icon_size_min_calc(icon->icon_object, &w, &h);
|
||||
printf("icon size: %d %d\n", w, h);
|
||||
//evas_object_resize(icon->icon_object, w, h);
|
||||
files = evas_list_append(files, icon);
|
||||
}
|
||||
}
|
||||
|
@ -1555,7 +1561,9 @@ _e_fm_dir_monitor_cb(void *data, Ecore_File_Monitor *ecore_file_monitor,
|
|||
icon->sd = sd;
|
||||
e_icon_layout_freeze(sd->layout);
|
||||
e_fm_icon_file_set(icon->icon_object, icon->file);
|
||||
e_fm_icon_image_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
//e_fm_icon_image_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
e_fm_icon_size_min_calc(icon->icon_object, &w, &h);
|
||||
evas_object_resize(icon->icon_object, sd->icon_info.w, sd->icon_info.h);
|
||||
evas_object_show(icon->icon_object);
|
||||
e_icon_layout_pack(sd->layout, icon->icon_object);
|
||||
evas_object_event_callback_add(icon->icon_object, EVAS_CALLBACK_MOUSE_DOWN, _e_fm_icon_mouse_down_cb, icon);
|
||||
|
|
|
@ -58,13 +58,32 @@ e_icon_file_key_set(Evas_Object *obj, const char *file, const char *key)
|
|||
_e_icon_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
void
|
||||
e_icon_file_edje_set(Evas_Object *obj, const char *file, const char *part)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
/* smart code here */
|
||||
if(sd->obj)
|
||||
evas_object_del(sd->obj);
|
||||
sd->obj = edje_object_add(evas_object_evas_get(obj));
|
||||
edje_object_file_set(sd->obj, file, part);
|
||||
_e_icon_smart_reconfigure(sd);
|
||||
}
|
||||
|
||||
const char *
|
||||
e_icon_file_get(Evas_Object *obj)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
char *file;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
{
|
||||
edje_object_file_get(sd->obj, &file, NULL);
|
||||
return file;
|
||||
}
|
||||
evas_object_image_file_get(sd->obj, &file, NULL);
|
||||
return file;
|
||||
}
|
||||
|
@ -75,6 +94,8 @@ e_icon_smooth_scale_set(Evas_Object *obj, int smooth)
|
|||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
evas_object_image_smooth_scale_set(sd->obj, smooth);
|
||||
}
|
||||
|
||||
|
@ -84,6 +105,8 @@ e_icon_smooth_scale_get(Evas_Object *obj)
|
|||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
return evas_object_image_smooth_scale_get(sd->obj);
|
||||
}
|
||||
|
||||
|
@ -92,7 +115,9 @@ e_icon_alpha_set(Evas_Object *obj, int alpha)
|
|||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
evas_object_image_alpha_set(sd->obj, alpha);
|
||||
}
|
||||
|
||||
|
@ -101,7 +126,9 @@ e_icon_alpha_get(Evas_Object *obj)
|
|||
{
|
||||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
return evas_object_image_alpha_get(sd->obj);
|
||||
}
|
||||
|
||||
|
@ -142,6 +169,8 @@ e_icon_data_set(Evas_Object *obj, void *data, int w, int h)
|
|||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
evas_object_image_size_set(sd->obj, w, h);
|
||||
evas_object_image_data_copy_set(sd->obj, data);
|
||||
}
|
||||
|
@ -152,6 +181,8 @@ e_icon_data_get(Evas_Object *obj, int *w, int *h)
|
|||
E_Smart_Data *sd;
|
||||
|
||||
sd = evas_object_smart_data_get(obj);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
return;
|
||||
evas_object_image_size_get(sd->obj, w, h);
|
||||
return evas_object_image_data_get(sd->obj, 0);
|
||||
}
|
||||
|
@ -165,7 +196,10 @@ _e_icon_smart_reconfigure(E_Smart_Data *sd)
|
|||
|
||||
ih = 0;
|
||||
ih = 0;
|
||||
evas_object_image_size_get(sd->obj, &iw, &ih);
|
||||
if(!strcmp(evas_object_type_get(sd->obj), "edje"))
|
||||
edje_object_size_min_calc(sd->obj, &iw, &ih);
|
||||
else
|
||||
evas_object_image_size_get(sd->obj, &iw, &ih);
|
||||
if (iw < 1) iw = 1;
|
||||
if (ih < 1) ih = 1;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
EAPI Evas_Object *e_icon_add (Evas *evas);
|
||||
EAPI void e_icon_file_set (Evas_Object *obj, const char *file);
|
||||
EAPI void e_icon_file_key_set (Evas_Object *obj, const char *file, const char *key);
|
||||
EAPI void e_icon_file_edje_set (Evas_Object *obj, const char *file, const char *part);
|
||||
EAPI const char *e_icon_file_get (Evas_Object *obj);
|
||||
EAPI void e_icon_smooth_scale_set (Evas_Object *obj, int smooth);
|
||||
EAPI int e_icon_smooth_scale_get (Evas_Object *obj);
|
||||
|
|
|
@ -290,7 +290,7 @@ e_thumb_create(char *file, Evas_Coord w, Evas_Coord h)
|
|||
|
||||
/* get evas object containing image of the thumb */
|
||||
Evas_Object *
|
||||
e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord height)
|
||||
e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord height, int shrink)
|
||||
{
|
||||
Eet_File *ef;
|
||||
char *thumb, *ext;
|
||||
|
@ -322,8 +322,8 @@ e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord hei
|
|||
else
|
||||
{
|
||||
D(("e_thumb_evas_object_get: creating eap thumb\n"));
|
||||
im = edje_object_add(evas);
|
||||
edje_object_file_set(im, file, "icon");
|
||||
im = e_icon_add(evas);
|
||||
e_icon_file_edje_set(im, file, "icon");
|
||||
e_object_unref(E_OBJECT(app));
|
||||
D(("e_thumb_evas_object_get: returning eap thumb\n"));
|
||||
return im;
|
||||
|
@ -357,6 +357,12 @@ e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord hei
|
|||
|
||||
im = e_icon_add(evas);
|
||||
e_icon_file_key_set(im, thumb, "/thumbnail/data");
|
||||
if (shrink)
|
||||
{
|
||||
Evas_Coord sw, sh;
|
||||
e_icon_size_get(im, &sw, &sh);
|
||||
evas_object_resize(im, sw, sh);
|
||||
}
|
||||
e_icon_fill_inside_set(im, 1);
|
||||
free(thumb);
|
||||
eet_close(ef);
|
||||
|
|
|
@ -14,7 +14,7 @@ EAPI const char *e_thumb_dir_get(void);
|
|||
EAPI char *e_thumb_file_get(char *file);
|
||||
EAPI int e_thumb_exists(char *file);
|
||||
EAPI int e_thumb_create(char *file, Evas_Coord w, Evas_Coord h);
|
||||
EAPI Evas_Object *e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord height);
|
||||
EAPI Evas_Object *e_thumb_evas_object_get(char *file, Evas *evas, Evas_Coord width, Evas_Coord height, int shrink);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue