forked from enlightenment/enlightenment
e17/evry: allow theme to set min size of thumb view icons
- cleanup list swallow functions... thought there was a bug SVN revision: 62599
This commit is contained in:
parent
4bb85a2b3b
commit
7e553786d5
|
@ -1691,8 +1691,8 @@ evry_browse_item(Evry_Item *it)
|
||||||
if (s->view)
|
if (s->view)
|
||||||
{
|
{
|
||||||
s->view->state = s;
|
s->view->state = s;
|
||||||
_evry_view_show(win, s->view, SLIDE_LEFT);
|
|
||||||
s->view->update(s->view);
|
s->view->update(s->view);
|
||||||
|
_evry_view_show(win, s->view, SLIDE_LEFT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1704,17 +1704,21 @@ evry_browse_item(Evry_Item *it)
|
||||||
int
|
int
|
||||||
evry_browse_back(Evry_Selector *sel)
|
evry_browse_back(Evry_Selector *sel)
|
||||||
{
|
{
|
||||||
Evry_Window *win = sel->win;
|
Evry_Window *win;
|
||||||
|
Evry_State *s;
|
||||||
|
|
||||||
if (!sel) sel = CUR_SEL;
|
if (!sel) return 0;
|
||||||
|
|
||||||
Evry_State *s = sel->state;
|
|
||||||
|
|
||||||
DBG("%p", sel);
|
if ((!sel) || !(win = sel->win))
|
||||||
|
|
||||||
if (!s || !sel->states->next)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!(s = sel->state) || (!sel->states->next))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* next = eina_list_data_get(sel->states->next);
|
||||||
|
* edje_object_part_unswallow(win->o_main, next->view->o_list); */
|
||||||
|
|
||||||
_evry_state_pop(sel, 0);
|
_evry_state_pop(sel, 0);
|
||||||
|
|
||||||
s = sel->state;
|
s = sel->state;
|
||||||
|
@ -2462,6 +2466,22 @@ _evry_plugin_action(Evry_Selector *sel, int finished)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_evry_view_list_swallow_set(Evas_Object *obj, const char *part, Evas_Object *swallow)
|
||||||
|
{
|
||||||
|
Evas_Object *o;
|
||||||
|
|
||||||
|
o = edje_object_part_swallow_get(obj, part);
|
||||||
|
if (o != swallow)
|
||||||
|
{
|
||||||
|
evas_object_hide(o);
|
||||||
|
edje_object_part_unswallow(obj, o);
|
||||||
|
|
||||||
|
edje_object_part_unswallow(obj, swallow);
|
||||||
|
edje_object_part_swallow(obj, part, swallow);
|
||||||
|
evas_object_show(swallow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evry_view_show(Evry_Window *win, Evry_View *v, int slide)
|
_evry_view_show(Evry_Window *win, Evry_View *v, int slide)
|
||||||
|
@ -2479,24 +2499,21 @@ _evry_view_show(Evry_Window *win, Evry_View *v, int slide)
|
||||||
|
|
||||||
if (slide == SLIDE_LEFT)
|
if (slide == SLIDE_LEFT)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list2", v->o_list);
|
_evry_view_list_swallow_set(win->o_main, "list:e.swallow.list2", v->o_list);
|
||||||
evas_object_show(v->o_list);
|
|
||||||
|
|
||||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,left", "e");
|
edje_object_signal_emit(win->o_main, "list:e,action,slide,left", "e");
|
||||||
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
||||||
}
|
}
|
||||||
else if (slide == SLIDE_RIGHT)
|
else if (slide == SLIDE_RIGHT)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list", v->o_list);
|
_evry_view_list_swallow_set(win->o_main, "list:e.swallow.list", v->o_list);
|
||||||
evas_object_show(v->o_list);
|
|
||||||
|
|
||||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,right", "e");
|
edje_object_signal_emit(win->o_main, "list:e,action,slide,right", "e");
|
||||||
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list", v->o_list);
|
_evry_view_list_swallow_set(win->o_main, "list:e.swallow.list", v->o_list);
|
||||||
evas_object_show(v->o_list);
|
|
||||||
|
|
||||||
edje_object_signal_emit(win->o_main, "list:e,action,slide,default", "e");
|
edje_object_signal_emit(win->o_main, "list:e,action,slide,default", "e");
|
||||||
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
edje_object_signal_emit(v->o_list, "e,action,show,list", "e");
|
||||||
|
@ -2540,8 +2557,8 @@ _evry_state_clear(Evry_Window *win)
|
||||||
|
|
||||||
if (v->o_list)
|
if (v->o_list)
|
||||||
{
|
{
|
||||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
|
||||||
evas_object_hide(v->o_list);
|
evas_object_hide(v->o_list);
|
||||||
|
edje_object_part_unswallow(win->o_main, v->o_list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2559,32 +2576,26 @@ _evry_view_hide(Evry_Window *win, Evry_View *v, int slide)
|
||||||
|
|
||||||
if (slide && v->o_list)
|
if (slide && v->o_list)
|
||||||
{
|
{
|
||||||
evas_object_hide(v->o_list);
|
win->state_clearing = v->state;
|
||||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
|
||||||
|
|
||||||
if (slide == SLIDE_RIGHT)
|
if (slide == SLIDE_RIGHT)
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list2",
|
_evry_view_list_swallow_set(win->o_main, "list:e.swallow.list2", v->o_list);
|
||||||
v->o_list);
|
|
||||||
|
|
||||||
win->state_clearing = v->state;
|
|
||||||
}
|
}
|
||||||
else /* if (slide == SLIDE_LEFT) */
|
else /* if (slide == SLIDE_LEFT) */
|
||||||
{
|
{
|
||||||
edje_object_part_swallow(win->o_main, "list:e.swallow.list",
|
_evry_view_list_swallow_set(win->o_main, "list:e.swallow.list", v->o_list);
|
||||||
v->o_list);
|
|
||||||
win->state_clearing = v->state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_object_show(v->o_list);
|
|
||||||
edje_object_signal_emit(v->o_list, "e,action,hide,list", "e");
|
edje_object_signal_emit(v->o_list, "e,action,hide,list", "e");
|
||||||
|
|
||||||
/* FIXME get signal from theme when anim finished */
|
/* FIXME get signal from theme when anim finished */
|
||||||
v->state->clear_timer = ecore_timer_add(0.5, _clear_timer, win);
|
v->state->clear_timer = ecore_timer_add(1.5, _clear_timer, win);
|
||||||
|
|
||||||
if (v->o_bar)
|
if (v->o_bar)
|
||||||
{
|
{
|
||||||
edje_object_part_unswallow(win->o_main, v->o_bar);
|
|
||||||
evas_object_hide(v->o_bar);
|
evas_object_hide(v->o_bar);
|
||||||
|
edje_object_part_unswallow(win->o_main, v->o_bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -2594,14 +2605,14 @@ _evry_view_hide(Evry_Window *win, Evry_View *v, int slide)
|
||||||
|
|
||||||
if (v->o_list)
|
if (v->o_list)
|
||||||
{
|
{
|
||||||
edje_object_part_unswallow(win->o_main, v->o_list);
|
|
||||||
evas_object_hide(v->o_list);
|
evas_object_hide(v->o_list);
|
||||||
|
edje_object_part_unswallow(win->o_main, v->o_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v->o_bar)
|
if (v->o_bar)
|
||||||
{
|
{
|
||||||
edje_object_part_unswallow(win->o_main, v->o_bar);
|
|
||||||
evas_object_hide(v->o_bar);
|
evas_object_hide(v->o_bar);
|
||||||
|
edje_object_part_unswallow(win->o_main, v->o_bar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -419,12 +419,20 @@ _e_smart_reconfigure_do(void *data)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sd->view->zoom == 0)
|
Evas_Object *o = edje_object_add(sd->view->evas);
|
||||||
ww = 96;
|
e_theme_edje_object_set(o, "base/theme/modules/everything",
|
||||||
else if (sd->view->zoom == 1)
|
"e/modules/everything/thumbview/item/thumb");
|
||||||
ww = 128;
|
edje_object_size_min_get(o, &ww, &hh);
|
||||||
else
|
evas_object_del(o);
|
||||||
ww = 192;
|
if (!ww)
|
||||||
|
{
|
||||||
|
if (sd->view->zoom == 0)
|
||||||
|
ww = 96;
|
||||||
|
else if (sd->view->zoom == 1)
|
||||||
|
ww = 128;
|
||||||
|
else
|
||||||
|
ww = 192;
|
||||||
|
}
|
||||||
|
|
||||||
div = sd->w / ww;
|
div = sd->w / ww;
|
||||||
if (div < 1) div = 1;
|
if (div < 1) div = 1;
|
||||||
|
|
Loading…
Reference in New Issue