언어 설정

Menu
Sites
Language
What's fixed meaning in edje

As below code copy from a sample tizen native app project. I've reading from some topic on the help doc, and konw some basic concepts about the widget layout in EDC file, such as the rel1, rel2, to, offset, align, relative. Did the fixed is oppsite to the relative? But from the sample code, seems it's not.

         part { name: "bg_rect";
            type: RECT;
            scale: 1;
            description { state: "default" 0.0;
               fixed: 1 1;
               rel1 { relative: 0.0 0.0; }
               rel2 { relative: 1.0 1.0; }
               color: 0 0 0 255;
            }
         }

 

Responses

4 댓글
Alex Ashirov

Hi,

According to the docs:

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/ui/edc_collections_group_parts_part_blocks.htm

  • fixed [width, 0 or 1] [height, 0 or 1]

Sets the minimum size calculation. See edje_object_size_min_calc() and edje_object_size_min_restricted_calc(). This tells the min size calculation routine that this part does not change size in width or height (1 for it does not, 0 for it does), so the routine does not try to expand or contract the part.

  • relative [X axis] [Y axis]

Moves the corner to a relative position inside the container of the relative "to" part. Values from 0.0 (0%, beginning) to 1.0 (100%, end) of each axis.

So, as far as I understand the fixed isn’t opposite to relative. They have different meanings.

colin Rao

Seems it's min size issue of a widget, but there's a min setting in edje, so what's the difference between them?

Alex Ashirov

Hi,

Tizen documentation describes this as following:

Calculating Edje Object Total Size

When the EDC file is composed of a lot of parts, Edje calculates the size of the global Edje object, by taking all the parts and their parameters into account. Some parameters have an role in this calculation and affect the global size:

  • min and max: these define the minimum and the maximum size of a part.
  • rel1 and rel2: these specify the relative position of a part.
  • align: this relates to the alignment of the part in the parent's object.
  • fixed: this defines if the part has a fixed size.
Note
fixed parameter can only be used on TEXTBLOCK type parts. Setting this parameter to fixed: 1 1 will not take into account the part for the calculation of the global size.
Alex Ashirov

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/guide/ui/edc_guide.htm