parent
55de2e2b43
commit
ad11feb626
|
@ -77,7 +77,7 @@ _e_resize_begin(void *data __UNUSED__, void *border)
|
||||||
e_popup_layer_set(_disp_pop, 255);
|
e_popup_layer_set(_disp_pop, 255);
|
||||||
_obj = edje_object_add(_disp_pop->evas);
|
_obj = edje_object_add(_disp_pop->evas);
|
||||||
e_theme_edje_object_set(_obj, "base/theme/borders",
|
e_theme_edje_object_set(_obj, "base/theme/borders",
|
||||||
"e/widgets/border/default/resize");
|
"e/widgets/border/default/resize");
|
||||||
snprintf(buf, sizeof(buf), "9999x9999");
|
snprintf(buf, sizeof(buf), "9999x9999");
|
||||||
edje_object_part_text_set(_obj, "e.text.label", buf);
|
edje_object_part_text_set(_obj, "e.text.label", buf);
|
||||||
|
|
||||||
|
@ -89,19 +89,19 @@ _e_resize_begin(void *data __UNUSED__, void *border)
|
||||||
|
|
||||||
if (!visible)
|
if (!visible)
|
||||||
{
|
{
|
||||||
evas_object_show(_obj);
|
evas_object_show(_obj);
|
||||||
e_popup_show(_disp_pop);
|
e_popup_show(_disp_pop);
|
||||||
visible = 1;
|
visible = 1;
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "%ix%i", w, h);
|
snprintf(buf, sizeof(buf), "%ix%i", w, h);
|
||||||
edje_object_part_text_set(_obj, "e.text.label", buf);
|
edje_object_part_text_set(_obj, "e.text.label", buf);
|
||||||
|
|
||||||
e_popup_move_resize(_disp_pop,
|
e_popup_move_resize(_disp_pop,
|
||||||
(obj_x - _disp_pop->zone->x) +
|
(obj_x - _disp_pop->zone->x) +
|
||||||
((obj_w - ew) / 2),
|
((obj_w - ew) / 2),
|
||||||
(obj_y - _disp_pop->zone->y) +
|
(obj_y - _disp_pop->zone->y) +
|
||||||
((obj_h - eh) / 2),
|
((obj_h - eh) / 2),
|
||||||
ew, eh);
|
ew, eh);
|
||||||
|
|
||||||
e_popup_show(_disp_pop);
|
e_popup_show(_disp_pop);
|
||||||
|
|
||||||
|
@ -113,16 +113,16 @@ _e_resize_end(void *data __UNUSED__, void *border __UNUSED__)
|
||||||
{
|
{
|
||||||
if (e_config->resize_info_visible)
|
if (e_config->resize_info_visible)
|
||||||
{
|
{
|
||||||
if (_obj)
|
if (_obj)
|
||||||
{
|
{
|
||||||
evas_object_del(_obj);
|
evas_object_del(_obj);
|
||||||
_obj = NULL;
|
_obj = NULL;
|
||||||
}
|
}
|
||||||
if (_disp_pop)
|
if (_disp_pop)
|
||||||
{
|
{
|
||||||
e_object_del(E_OBJECT(_disp_pop));
|
e_object_del(E_OBJECT(_disp_pop));
|
||||||
_disp_pop = NULL;
|
_disp_pop = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visible = 0;
|
visible = 0;
|
||||||
|
@ -146,9 +146,9 @@ _e_resize_update(void *data __UNUSED__, void *border)
|
||||||
|
|
||||||
if (!visible)
|
if (!visible)
|
||||||
{
|
{
|
||||||
evas_object_show(_obj);
|
evas_object_show(_obj);
|
||||||
e_popup_show(_disp_pop);
|
e_popup_show(_disp_pop);
|
||||||
visible = 1;
|
visible = 1;
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "%ix%i", w, h);
|
snprintf(buf, sizeof(buf), "%ix%i", w, h);
|
||||||
edje_object_part_text_set(_obj, "e.text.label", buf);
|
edje_object_part_text_set(_obj, "e.text.label", buf);
|
||||||
|
@ -160,25 +160,25 @@ _e_resize_border_extents(E_Border *bd, int *w, int *h)
|
||||||
if ((bd->client.icccm.base_w >= 0) &&
|
if ((bd->client.icccm.base_w >= 0) &&
|
||||||
(bd->client.icccm.base_h >= 0))
|
(bd->client.icccm.base_h >= 0))
|
||||||
{
|
{
|
||||||
if (bd->client.icccm.step_w > 0)
|
if (bd->client.icccm.step_w > 0)
|
||||||
*w = (bd->client.w - bd->client.icccm.base_w) / bd->client.icccm.step_w;
|
*w = (bd->client.w - bd->client.icccm.base_w) / bd->client.icccm.step_w;
|
||||||
else
|
else
|
||||||
*w = bd->client.w;
|
*w = bd->client.w;
|
||||||
if (bd->client.icccm.step_h > 0)
|
if (bd->client.icccm.step_h > 0)
|
||||||
*h = (bd->client.h - bd->client.icccm.base_h) / bd->client.icccm.step_h;
|
*h = (bd->client.h - bd->client.icccm.base_h) / bd->client.icccm.step_h;
|
||||||
else
|
else
|
||||||
*h = bd->client.h;
|
*h = bd->client.h;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (bd->client.icccm.step_w > 0)
|
if (bd->client.icccm.step_w > 0)
|
||||||
*w = (bd->client.w - bd->client.icccm.min_w) / bd->client.icccm.step_w;
|
*w = (bd->client.w - bd->client.icccm.min_w) / bd->client.icccm.step_w;
|
||||||
else
|
else
|
||||||
*w = bd->client.w;
|
*w = bd->client.w;
|
||||||
if (bd->client.icccm.step_h > 0)
|
if (bd->client.icccm.step_h > 0)
|
||||||
*h = (bd->client.h - bd->client.icccm.min_h) / bd->client.icccm.step_h;
|
*h = (bd->client.h - bd->client.icccm.min_h) / bd->client.icccm.step_h;
|
||||||
else
|
else
|
||||||
*h = bd->client.h;
|
*h = bd->client.h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ _e_move_begin(void *data __UNUSED__, void *border)
|
||||||
_disp_pop = e_popup_new(bd->zone, 0, 0, 1, 1);
|
_disp_pop = e_popup_new(bd->zone, 0, 0, 1, 1);
|
||||||
_obj = edje_object_add(_disp_pop->evas);
|
_obj = edje_object_add(_disp_pop->evas);
|
||||||
e_theme_edje_object_set(_obj, "base/theme/borders",
|
e_theme_edje_object_set(_obj, "base/theme/borders",
|
||||||
"e/widgets/border/default/move");
|
"e/widgets/border/default/move");
|
||||||
snprintf(buf, sizeof(buf), "9999 9999");
|
snprintf(buf, sizeof(buf), "9999 9999");
|
||||||
edje_object_part_text_set(_obj, "e.text.label", buf);
|
edje_object_part_text_set(_obj, "e.text.label", buf);
|
||||||
|
|
||||||
|
@ -215,11 +215,11 @@ _e_move_begin(void *data __UNUSED__, void *border)
|
||||||
e_popup_edje_bg_object_set(_disp_pop, _obj);
|
e_popup_edje_bg_object_set(_disp_pop, _obj);
|
||||||
|
|
||||||
e_popup_move_resize(_disp_pop,
|
e_popup_move_resize(_disp_pop,
|
||||||
(obj_x - _disp_pop->zone->x) +
|
(obj_x - _disp_pop->zone->x) +
|
||||||
((obj_w - ew) / 2),
|
((obj_w - ew) / 2),
|
||||||
(obj_y - _disp_pop->zone->y) +
|
(obj_y - _disp_pop->zone->y) +
|
||||||
((obj_h - eh) / 2),
|
((obj_h - eh) / 2),
|
||||||
ew, eh);
|
ew, eh);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -227,16 +227,16 @@ _e_move_end(void *data __UNUSED__, void *border __UNUSED__)
|
||||||
{
|
{
|
||||||
if (e_config->move_info_visible)
|
if (e_config->move_info_visible)
|
||||||
{
|
{
|
||||||
if (_obj)
|
if (_obj)
|
||||||
{
|
{
|
||||||
evas_object_del(_obj);
|
evas_object_del(_obj);
|
||||||
_obj = NULL;
|
_obj = NULL;
|
||||||
}
|
}
|
||||||
if (_disp_pop)
|
if (_disp_pop)
|
||||||
{
|
{
|
||||||
e_object_del(E_OBJECT(_disp_pop));
|
e_object_del(E_OBJECT(_disp_pop));
|
||||||
_disp_pop = NULL;
|
_disp_pop = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visible = 0;
|
visible = 0;
|
||||||
|
@ -257,9 +257,9 @@ _e_move_update(void *data __UNUSED__, void *border)
|
||||||
|
|
||||||
if (!visible)
|
if (!visible)
|
||||||
{
|
{
|
||||||
evas_object_show(_obj);
|
evas_object_show(_obj);
|
||||||
e_popup_show(_disp_pop);
|
e_popup_show(_disp_pop);
|
||||||
visible = 1;
|
visible = 1;
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "%i %i", bd->x, bd->y);
|
snprintf(buf, sizeof(buf), "%i %i", bd->x, bd->y);
|
||||||
edje_object_part_text_set(_obj, "e.text.label", buf);
|
edje_object_part_text_set(_obj, "e.text.label", buf);
|
||||||
|
@ -274,11 +274,12 @@ _e_move_resize_object_coords_set(int x, int y, int w, int h)
|
||||||
obj_h = h;
|
obj_h = h;
|
||||||
if ((_disp_pop) && (e_config->move_info_visible) && (visible))
|
if ((_disp_pop) && (e_config->move_info_visible) && (visible))
|
||||||
{
|
{
|
||||||
e_popup_move(_disp_pop,
|
e_popup_move(_disp_pop,
|
||||||
(obj_x - _disp_pop->zone->x) +
|
(obj_x - _disp_pop->zone->x) +
|
||||||
((obj_w - _disp_pop->w) / 2),
|
((obj_w - _disp_pop->w) / 2),
|
||||||
(obj_y - _disp_pop->zone->y) +
|
(obj_y - _disp_pop->zone->y) +
|
||||||
((obj_h - _disp_pop->h) / 2)
|
((obj_h - _disp_pop->h) / 2)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue