edje: make min: source work correctly with GROUP part.

This close task T54.
This commit is contained in:
Cedric Bail 2013-08-07 16:00:15 +09:00
parent 93b0fbfe65
commit 442dda08c4
3 changed files with 75 additions and 2 deletions

View File

@ -11,6 +11,7 @@ endif
#put here all EDCs one needs to the examples
EDCS = \
edje-group.edc \
edje-threshold.edc \
animations2.edc \
animations.edc \

View File

@ -0,0 +1,72 @@
collections {
group {
styles {
style {
name: "some style";
base: "font=Vera font_size=14 color=#0f0";
}
}
name: "some group with textblock";
parts {
part {
name: "textblock";
type: TEXTBLOCK;
description {
state: "default";
text {
style: "some style";
text: "Hello World!";
min: 1 1;
max: 1 1;
}
}
}
}
}
group {
name: "rect";
parts {
part {
name: "rect";
type: RECT;
description {
state: "default";
color: 255 0 0 255;
max: 10 10;
min: 10 10;
}
}
}
}
group {
name: "broken alignment";
parts {
part {
name: "sourced group top right";
type: GROUP;
source: "rect";
description {
state: "default";
min: SOURCE;
max: 0 0;
align: 1.0 0.0;
}
}
part {
name: "sourced group top left";
type: GROUP;
source: "some group with textblock";
description {
state: "default";
min: SOURCE;
max: 0 0;
align: 0.0 0.0;
}
}
}
}
}

View File

@ -1125,6 +1125,7 @@ _edje_part_recalc_single_aspect(Edje *ed,
params->eval.h = new_h;
}
}
params->eval.x = ADD(want_x,
MUL(SUB(want_w, params->eval.w),
desc->align.x));
@ -3091,8 +3092,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
return;
}
if (ep->part->scale &&
ep->part->type == EDJE_PART_TYPE_GROUP &&
if (ep->part->type == EDJE_PART_TYPE_GROUP &&
((ep->type == EDJE_RP_TYPE_SWALLOW) &&
(ep->typedata.swallow)) &&
ep->typedata.swallow->swallowed_object)