cedric pushed a commit to branch master.

commit 442dda08c4644e71daf290c342ac6e98425aa614
Author: Cedric Bail <[email protected]>
Date:   Wed Aug 7 16:00:15 2013 +0900

    edje: make min: source work correctly with GROUP part.
    
    This close task T54.
---
 src/examples/edje/Makefile.am    |  1 +
 src/examples/edje/edje-group.edc | 72 ++++++++++++++++++++++++++++++++++++++++
 src/lib/edje/edje_calc.c         |  4 +--
 3 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index 5d5dfa8..bda5f45 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -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 \
diff --git a/src/examples/edje/edje-group.edc b/src/examples/edje/edje-group.edc
new file mode 100644
index 0000000..f483e1c
--- /dev/null
+++ b/src/examples/edje/edje-group.edc
@@ -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;
+            }
+         }
+      }
+   }
+}
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 280dbac..fac832f 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -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)

-- 

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk

Reply via email to