fix frame handling.

before it was confusing having to place the img behind the border and
draw a hole, it would also cut parts of the view doing that.



SVN revision: 82679
devs/devilhorns/wayland_egl
Gustavo Sverzut Barbieri 10 years ago
parent 42d3b66cc5
commit d8db6705ad
  1. BIN
      data/ethumb/frames/border-0.jpg
  2. 35
      data/ethumb/frames/default.edc
  3. 8
      src/lib/ethumb/ethumb.c

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -7,40 +7,31 @@ collections {
name: "frame/default";
parts {
part {
name: "img";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
}
} // img
part {
name: "border";
type: IMAGE;
mouse_events: 0;
description {
state: "default" 0.0;
color: 224 224 224 255;
rel1 {
to: "img";
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
to: "img";
relative: 1.0 1.0;
offset: -1 -1;
}
image {
normal: "border-0.jpg";
border: 2 2 2 2;
middle: 0;
}
rel1.offset: -2 -2;
rel2.offset: 1 1;
}
} // border
}
part {
name: "img";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
rel1.offset: 2 2;
rel2.offset: -3 -3;
}
}
}
}
}

@ -1240,11 +1240,9 @@ ethumb_plugin_image_resize(Ethumb *e, int w, int h)
if (e->frame)
{
edje_extern_object_min_size_set(img, w, h);
edje_extern_object_max_size_set(img, w, h);
edje_object_calc_force(e->frame->edje);
evas_object_move(e->frame->edje, 0, 0);
evas_object_resize(e->frame->edje, w, h);
edje_object_calc_force(e->frame->edje);
}
else
{
@ -1514,11 +1512,9 @@ _ethumb_image_load(Ethumb *e)
if (e->frame)
{
edje_extern_object_min_size_set(img, ww, hh);
edje_extern_object_max_size_set(img, ww, hh);
edje_object_calc_force(e->frame->edje);
evas_object_move(e->frame->edje, 0, 0);
evas_object_resize(e->frame->edje, ww, hh);
edje_object_calc_force(e->frame->edje);
}
else
{

Loading…
Cancel
Save