e-modules/comp-scale:
- advance from fast to slow in pager zoom out animation - fix scale placement with popups/shelves visible - grow less when shrink is enabled so that shrink can fit windows better - add some NULL checks SVN revision: 57930
This commit is contained in:
parent
b7d844eb89
commit
3356d510c1
|
@ -143,9 +143,17 @@ _pager_redraw(void *data)
|
|||
if (scale > 1.0) scale = 1.0;
|
||||
if (scale < 0.0) scale = 0.0;
|
||||
|
||||
in = log(10) * scale;
|
||||
in = 1.0 / exp(in*in);
|
||||
|
||||
if (scale_state)
|
||||
{
|
||||
in = log(14) * scale;
|
||||
in = 1.0 / exp(in*in);
|
||||
}
|
||||
else
|
||||
{
|
||||
in = log(14) * (1.0 - scale);
|
||||
in = 1.0 - (1.0 / exp(in*in));
|
||||
}
|
||||
|
||||
if (in > 1.0) in = 1.0;
|
||||
if (in < 0.0) in = 0.0;
|
||||
|
||||
|
@ -193,7 +201,9 @@ _pager_redraw(void *data)
|
|||
return 1;
|
||||
|
||||
if (scale == 0.0)
|
||||
_pager_finish();
|
||||
{
|
||||
_pager_finish();
|
||||
}
|
||||
else
|
||||
{
|
||||
_pager_place_windows(0.0);
|
||||
|
@ -304,6 +314,9 @@ _pager_finish()
|
|||
EINA_LIST_FREE(handlers, handler)
|
||||
ecore_event_handler_del(handler);
|
||||
|
||||
if (scale_animator)
|
||||
ecore_animator_del(scale_animator);
|
||||
scale_animator = NULL;
|
||||
evas_object_del(zone_clip);
|
||||
zone_clip = NULL;
|
||||
e_msg_handler_del(msg_handler);
|
||||
|
@ -357,7 +370,9 @@ _pager_win_cb_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info
|
|||
{
|
||||
selected_item = it;
|
||||
|
||||
_pager_desk_select(it->desk);
|
||||
if (current_desk != it->desk)
|
||||
_pager_desk_select(it->desk);
|
||||
|
||||
_pager_out();
|
||||
return;
|
||||
}
|
||||
|
@ -967,8 +982,13 @@ _pager_run(E_Manager *man)
|
|||
if (!e) return EINA_FALSE;
|
||||
|
||||
zone = e_util_zone_current_get(man);
|
||||
if (!zone)
|
||||
return EINA_FALSE;
|
||||
|
||||
current_desk = e_desk_current_get(zone);
|
||||
|
||||
if (!current_desk)
|
||||
return EINA_FALSE;
|
||||
|
||||
input_win = ecore_x_window_input_new(zone->container->win,
|
||||
0, 0, 1, 1);
|
||||
ecore_x_window_show(input_win);
|
||||
|
@ -1086,6 +1106,12 @@ pager_run(E_Manager *man, const char *params, int init_method)
|
|||
if (input_win)
|
||||
return ret;
|
||||
|
||||
if (scale_animator)
|
||||
{
|
||||
ecore_animator_del(scale_animator);
|
||||
scale_animator = NULL;
|
||||
}
|
||||
|
||||
ret = _pager_run(man);
|
||||
|
||||
if (ret)
|
||||
|
|
|
@ -174,7 +174,7 @@ _scale_redraw(void *data)
|
|||
if (scale > 1.0) scale = 1.0;
|
||||
if (scale < 0.0) scale = 0.0;
|
||||
|
||||
in = log(10) * scale;
|
||||
in = log(14) * scale;
|
||||
in = 1.0 / exp(in*in);
|
||||
|
||||
_scale_place_windows(in);
|
||||
|
@ -233,7 +233,7 @@ _scale_redraw(void *data)
|
|||
if (scale < 1.0 && scale > 0.0)
|
||||
return 1;
|
||||
|
||||
if (scale == 0.0)
|
||||
if ((!scale_state) && (scale == 0.0))
|
||||
_scale_finish();
|
||||
else
|
||||
_scale_place_windows(0.0);
|
||||
|
@ -716,7 +716,7 @@ _scale_switch(const char *params)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((!sel->next) || (!sel->prev))
|
||||
if ((!sel) || (!sel->next) || (!sel->prev))
|
||||
return;
|
||||
|
||||
if (!strcmp(params, "_next"))
|
||||
|
@ -903,7 +903,12 @@ _scale_run(E_Manager *man)
|
|||
if (!e) return EINA_FALSE;
|
||||
|
||||
zone = e_util_zone_current_get(e_manager_current_get());
|
||||
if (!zone)
|
||||
return EINA_FALSE;
|
||||
|
||||
current_desk = e_desk_current_get(zone);
|
||||
if (!current_desk)
|
||||
return EINA_FALSE;
|
||||
|
||||
start_time = ecore_time_get();
|
||||
|
||||
|
@ -969,12 +974,10 @@ _scale_run(E_Manager *man)
|
|||
if (!scale_conf->fade_popups)
|
||||
{
|
||||
e_zone_useful_geometry_get(zone, &use_x, &use_y, &use_w, &use_h);
|
||||
use_x -= zone->x;
|
||||
use_y -= zone->y;
|
||||
use_w += use_x - spacing*2;
|
||||
use_h += use_y - spacing*2;
|
||||
use_x += spacing;
|
||||
use_y += spacing;
|
||||
use_x = use_x - zone->x + spacing;
|
||||
use_y = use_y - zone->y + spacing;
|
||||
use_w += use_x - spacing;
|
||||
use_h += use_y - spacing;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1004,9 +1007,17 @@ _scale_run(E_Manager *man)
|
|||
if ((scale_conf->grow && !show_all_desks) ||
|
||||
(scale_conf->desks_grow && show_all_desks))
|
||||
{
|
||||
if ((scale_conf->tight && !show_all_desks) ||
|
||||
(scale_conf->desks_tight && show_all_desks))
|
||||
spacing += 5;
|
||||
|
||||
i = 0;
|
||||
while (i++ < GROW_RUNS && _scale_grow());
|
||||
DBG("grow %d", i);
|
||||
|
||||
if ((scale_conf->tight && !show_all_desks) ||
|
||||
(scale_conf->desks_tight && show_all_desks))
|
||||
spacing -= 5;
|
||||
}
|
||||
|
||||
if ((scale_conf->tight && !show_all_desks) ||
|
||||
|
|
Loading…
Reference in New Issue