forked from enlightenment/enlightenment
ibox: Handle preview when shaded.
The user is minimizing a shaded window. We have the border pixel data. For now, give the object a "sensible" shaded set of dimensions.
This commit is contained in:
parent
a05ac83a31
commit
c3a2a7f818
|
@ -601,6 +601,7 @@ _ibox_icon_fill_preview(IBox_Icon *ic, Eina_Bool is_retry)
|
||||||
{
|
{
|
||||||
E_Client *ec;
|
E_Client *ec;
|
||||||
Evas_Object *img, *img2;
|
Evas_Object *img, *img2;
|
||||||
|
int w, h;
|
||||||
|
|
||||||
ec = ic->client;
|
ec = ic->client;
|
||||||
|
|
||||||
|
@ -610,15 +611,19 @@ _ibox_icon_fill_preview(IBox_Icon *ic, Eina_Bool is_retry)
|
||||||
ecore_timer_add(0.5, _ibox_icon_fill_timer, ic);
|
ecore_timer_add(0.5, _ibox_icon_fill_timer, ic);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
evas_object_size_hint_aspect_set(img, EVAS_ASPECT_CONTROL_BOTH, ec->client.w, ec->client.h);
|
w = ec->client.w;
|
||||||
evas_object_size_hint_max_set(img, ec->client.w, ec->client.h);
|
h = ec->client.h;
|
||||||
|
if (ec->shaded)
|
||||||
|
evas_object_geometry_get(ec->frame_object, NULL, NULL, &w, &h);
|
||||||
|
evas_object_size_hint_aspect_set(img, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||||
|
evas_object_size_hint_max_set(img, w, h);
|
||||||
ic->o_icon = img;
|
ic->o_icon = img;
|
||||||
edje_object_part_swallow(ic->o_holder, "e.swallow.preview", ic->o_icon);
|
edje_object_part_swallow(ic->o_holder, "e.swallow.preview", ic->o_icon);
|
||||||
evas_object_pass_events_set(ic->o_icon, 1);
|
evas_object_pass_events_set(ic->o_icon, 1);
|
||||||
evas_object_show(ic->o_icon);
|
evas_object_show(ic->o_icon);
|
||||||
|
|
||||||
img2 = e_comp_object_util_frame_mirror_add(ec->frame);
|
img2 = e_comp_object_util_frame_mirror_add(ec->frame);
|
||||||
evas_object_size_hint_aspect_set(img2, EVAS_ASPECT_CONTROL_BOTH, ec->client.w, ec->client.h);
|
evas_object_size_hint_aspect_set(img2, EVAS_ASPECT_CONTROL_BOTH, w, h);
|
||||||
ic->o_icon2 = img2;
|
ic->o_icon2 = img2;
|
||||||
edje_object_part_swallow(ic->o_holder2, "e.swallow.preview", ic->o_icon2);
|
edje_object_part_swallow(ic->o_holder2, "e.swallow.preview", ic->o_icon2);
|
||||||
evas_object_pass_events_set(ic->o_icon2, 1);
|
evas_object_pass_events_set(ic->o_icon2, 1);
|
||||||
|
|
Loading…
Reference in New Issue