Hello Tom. Thanks for fixing it. Btw, why it was hackish/broken? Top/Bottom/Left/Right paddings were used to handle scale factor. 'min' with 'scale:1' will be affected by scale factor but 'offset' is not.
I'm curious 1. Why it was broken, 2. How can we support scale factor with the right way. Thanks in advance. Daniel Juyung Seo (SeoZ) On Tue, Aug 30, 2011 at 8:05 PM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > Elm default theme: Fix segment control's theme. > > It was very hackish/broken and it broke when gustavo fixed some stuff in > edje. I merged all the different padding items to one padding frame, > and corrected some of the things that were wrong, and tada, now everything > works. > > Author: tasn > Date: 2011-08-30 04:05:04 -0700 (Tue, 30 Aug 2011) > New Revision: 62983 > Trac: http://trac.enlightenment.org/e/changeset/62983 > > Modified: > trunk/elementary/data/themes/widgets/segment_control.edc > > Modified: trunk/elementary/data/themes/widgets/segment_control.edc > =================================================================== > --- trunk/elementary/data/themes/widgets/segment_control.edc 2011-08-30 > 08:40:02 UTC (rev 62982) > +++ trunk/elementary/data/themes/widgets/segment_control.edc 2011-08-30 > 11:05:04 UTC (rev 62983) > @@ -151,62 +151,17 @@ > } > } > } > - part { name: "padding_left"; > + part { name: "padding_frame"; > type: RECT; > scale: 1; > mouse_events: 0; > description { state: "default" 0.0; > - align: 0.0 0.0; > - rel1.relative: 0.0 0.0; > - rel2.relative: 0.0 1.0; > - min: 2 2; > - max: 2 2; > - fixed: 1 0; > - color: 0 0 0 0; > - } > - } > - part { name: "padding_right"; > - type: RECT; > - scale: 1; > - mouse_events: 0; > - description { state: "default" 0.0; > visible: 0; > - align: 1.0 0.0; > - rel1.relative: 1.0 0.0; > - rel2.relative: 1.0 1.0; > - min: 2 2; > - max: 2 2; > - fixed: 1 0; > + /* Add a padding of 2 pxs in all directions */ > + rel1.offset: 2 2; > + rel2.offset: -3 -3; > } > } > - part { name: "padding_top"; > - type: RECT; > - scale: 1; > - mouse_events: 0; > - description { state: "default" 0.0; > - visible: 0; > - align: 0.0 0.0; > - rel1.relative: 0.0 0.0; > - rel2.relative: 1.0 0.0; > - min: 2 2; > - max: 2 2; > - fixed: 0 1; > - } > - } > - part { name: "padding_bottom"; > - type: RECT; > - scale: 1; > - mouse_events: 0; > - description { state: "default" 0.0; > - visible: 0; > - align: 1.0 1.0; > - rel1.relative: 0.0 1.0; > - rel2.relative: 1.0 1.0; > - min: 2 2; > - max: 2 2; > - fixed: 0 1; > - } > - } > part { name: "icon.bg"; > type: RECT; > scale: 1; > @@ -214,16 +169,8 @@ > description { state: "default" 0.0; > visible: 0; > fixed: 1 0; > - rel1 { > - to_x: "padding_left"; > - to_y: "padding_top"; > - relative: 1.0 1.0; > - } > - rel2 { > - to: "elm.swallow.icon"; > - relative: 1.0 1.0; > - } > - align: 0.0 0.5; > + rel1.to: "elm.swallow.icon"; > + rel2.to: "elm.swallow.icon"; > } > } > part { name: "padding_icon_text"; > @@ -241,15 +188,13 @@ > to: "icon.bg"; > relative: 1.0 1.0; > } > - fixed: 1 0; > - min: 0 0; > } > description { state: "icononly" 0.0; > inherit: "default" 0.0; > } > description { state: "visible" 0.0; //when icon is visible > inherit: "default" 0.0; > - min: 2 0; > + rel2.offset: 2 0; > } > } > part { name: "elm.swallow.icon"; > @@ -257,37 +202,22 @@ > scale: 1; > description { state: "default" 0.0; > visible: 0; > - align: 0.0 0.5; > - rel1 { > - to_x: "padding_left"; > - to_y: "padding_top"; > - relative: 1.0 1.0; > - } > - rel2 { > - to_y: "padding_bottom"; > - relative: 0.0 0.0; > - } > - fixed: 1 0; > + align: 0.5 0.5; > + rel1.to: "padding_frame"; > + rel2.to: "padding_frame"; > + rel2.relative: 0.0 0.0; > aspect: 1.0 1.0; > aspect_preference: BOTH; > } > description { state: "visible" 0.0; > inherit: "default" 0.0; > visible: 1; > - rel2 { > - to_y: "padding_bottom"; > - relative: 0.3 0.0; > - } > + rel2.relative: 0.3 1.0; > } > description { state: "icononly" 0.0; > inherit: "default" 0.0; > visible: 1; > - rel2 { > - to_x: "padding_right"; > - to_y: "padding_bottom"; > - relative: 0.0 0.0; > - } > - align: 0.5 0.5; > + rel2.relative: 1.0 1.0; > } > } > part { name: "elm.text"; > @@ -301,12 +231,9 @@ > min: 1 1; > rel1 { > to_x: "padding_icon_text"; > - relative: 1.0 1.0; > + relative: 1.0 0.0; > } > - rel2 { > - to_x: "padding_right"; > - relative: 0.0 0.0; > - } > + rel2.to: "padding_frame"; > color: 224 224 224 255; > color3: 0 0 0 64; > text { > > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel