add backing selection bits... just playing... :)


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 22 years ago
parent 3184ef1247
commit 7430113907
  1. BIN
      data/config/appearance/default/selections/file.bits.db
  2. 22
      src/icons.c
  3. 6
      src/shelf.c
  4. 14
      src/view.c

@ -232,6 +232,16 @@ e_icon_update(E_Icon *icon)
icon->previous.visible = icon->current.visible - 1;
obj_new = 1;
}
if (!icon->obj.sel_icon)
{
icon->obj.sel_icon = ebits_load(PACKAGE_DATA_DIR"/data/config/appearance/default/selections/file.bits.db");
if (icon->obj.sel_icon)
{
ebits_add_to_evas(icon->obj.sel_icon, icon->view->evas);
ebits_set_layer(icon->obj.sel_icon, 9);
ebits_set_color_class(icon->obj.sel_icon, "Selected BG", 100, 200, 255, 255);
}
}
if (obj_new)
{
if (icon->shelf)
@ -261,6 +271,16 @@ e_icon_update(E_Icon *icon)
evas_move(icon->view->evas, icon->obj.sel2, fx, fy);
evas_resize(icon->view->evas, icon->obj.sel2, tw, th);
evas_set_color(icon->view->evas, icon->obj.filename, 0, 0, 0, 255);
if (icon->obj.sel_icon)
{
int pl, pr, pt, pb;
pl = pr = pt = pb = 0;
ebits_get_insets(icon->obj.sel_icon, &pl, &pr, &pt, &pb);
ebits_move(icon->obj.sel_icon, icon->current.x - pl, icon->current.y - pt);
ebits_resize(icon->obj.sel_icon, iw + pl + pr, ih + pt + pb);
}
}
if (icon->current.visible != icon->previous.visible)
{
@ -270,6 +290,7 @@ e_icon_update(E_Icon *icon)
evas_show(icon->view->evas, icon->obj.filename);
evas_show(icon->view->evas, icon->obj.sel1);
evas_show(icon->view->evas, icon->obj.sel2);
ebits_show(icon->obj.sel_icon);
}
else
{
@ -277,6 +298,7 @@ e_icon_update(E_Icon *icon)
evas_hide(icon->view->evas, icon->obj.filename);
evas_hide(icon->view->evas, icon->obj.sel1);
evas_hide(icon->view->evas, icon->obj.sel2);
ebits_hide(icon->obj.sel_icon);
}
}

@ -172,7 +172,7 @@ e_shelf_realize(E_Shelf *sh)
ebits_add_to_evas(sh->bit.border, sh->view->evas);
ebits_move(sh->bit.border, sh->x, sh->y);
ebits_resize(sh->bit.border, sh->w, sh->h);
ebits_set_layer(sh->bit.border, 9);
ebits_set_layer(sh->bit.border, 5);
if (sh->visible)
ebits_show(sh->bit.border);
@ -297,6 +297,8 @@ e_shelf_add_icon(E_Shelf *sh, E_Icon *icon)
evas_set_clip(sh->view->evas, icon->obj.filename, sh->obj.clipper);
evas_set_clip(sh->view->evas, icon->obj.sel1, sh->obj.clipper);
evas_set_clip(sh->view->evas, icon->obj.sel2, sh->obj.clipper);
if (icon->obj.sel_icon)
ebits_set_clip(icon->obj.sel_icon, sh->obj.clipper);
}
void
@ -310,4 +312,6 @@ e_shelf_del_icon(E_Shelf *sh, E_Icon *icon)
evas_unset_clip(sh->view->evas, icon->obj.filename);
evas_unset_clip(sh->view->evas, icon->obj.sel1);
evas_unset_clip(sh->view->evas, icon->obj.sel2);
if (icon->obj.sel_icon)
ebits_unset_clip(icon->obj.sel_icon);
}

@ -579,18 +579,18 @@ e_view_handle_fs(EfsdEvent *ev)
icon->info.icon.selected = strdup(PACKAGE_DATA_DIR"/data/icons/directory/default.db:/icon/selected");
icon->info.icon.clicked = strdup(PACKAGE_DATA_DIR"/data/icons/directory/default.db:/icon/clicked");
}
else if (icon->info.is_exe)
{
icon->info.icon.normal = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/normal");
icon->info.icon.selected = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/selected");
icon->info.icon.clicked = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/clicked");
}
else if (icon->info.link)
{
icon->info.icon.normal = strdup(PACKAGE_DATA_DIR"/data/icons/file/default.db:/icon/normal");
icon->info.icon.selected = strdup(PACKAGE_DATA_DIR"/data/icons/file/default.db:/icon/selected");
icon->info.icon.clicked = strdup(PACKAGE_DATA_DIR"/data/icons/file/default.db:/icon/clicked");
}
else if (icon->info.is_exe)
{
icon->info.icon.normal = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/normal");
icon->info.icon.selected = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/selected");
icon->info.icon.clicked = strdup(PACKAGE_DATA_DIR"/data/icons/executable/default.db:/icon/clicked");
}
else
{
icon->info.icon.normal = strdup(PACKAGE_DATA_DIR"/data/icons/file/default.db:/icon/normal");
@ -679,7 +679,7 @@ e_view_new(void)
e_shelf_set_view(sh, v);
e_shelf_show(sh);
e_shelf_move(sh, 10, 10);
e_shelf_resize(sh, 200, 150);
e_shelf_resize(sh, 500, 350);
v->shelves = evas_list_append(v->shelves, sh);
}

Loading…
Cancel
Save