Very good patch!!

By the way, why my elementary_test is broken?
All widgets which are using box such as list, index, panel, toolbar,
ctxpopup, hoversel, diskselector, map, menu has weird paddings.
It looks like only mine has problem :(
I build all core efl libraries and elm.

Any guess?

Thanks.
Daniel Juyung Seo (SeoZ)

On Thu, May 26, 2011 at 6:22 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> elm box -> use padding!
>
>
>
> Author:       raster
> Date:         2011-05-26 02:22:43 -0700 (Thu, 26 May 2011)
> New Revision: 59699
> Trac:         http://trac.enlightenment.org/e/changeset/59699
>
> Modified:
>  trunk/elementary/src/bin/test_box.c trunk/elementary/src/lib/els_box.c
>
> Modified: trunk/elementary/src/bin/test_box.c
> ===================================================================
> --- trunk/elementary/src/bin/test_box.c 2011-05-26 09:02:00 UTC (rev 59698)
> +++ trunk/elementary/src/bin/test_box.c 2011-05-26 09:22:43 UTC (rev 59699)
> @@ -77,7 +77,8 @@
>
>    bx = elm_box_add(win);
>    elm_win_resize_object_add(win, bx);
> -   evas_object_size_hint_weight_set(bx, 0.0, 0.0);
> +   elm_box_padding_set(bx, 10, 10);
> +   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
>    evas_object_show(bx);
>
>    bt = elm_button_add(win);
> @@ -188,8 +189,8 @@
>    if (!data) return;
>    next_layout = eina_list_data_get(tdata->transitions);
>    layout_data = elm_box_transition_new(2.0, tdata->last_layout,
> -         NULL, NULL, next_layout, NULL, NULL,
> -         _test_box_transition_change, tdata);
> +                                        NULL, NULL, next_layout, NULL, NULL,
> +                                        _test_box_transition_change, tdata);
>    elm_box_layout_set(tdata->box, elm_box_layout_transition, layout_data, 
> elm_box_transition_free);
>    tdata->last_layout = next_layout;
>
> @@ -200,8 +201,9 @@
>  _win_del(void *data, Evas_Object *obj __UNUSED__, void *event_info 
> __UNUSED__)
>  {
>    Transitions_Data *tdata = data;
> +   if (!data) return;
>    elm_box_layout_set(tdata->box, evas_object_box_layout_horizontal, NULL, 
> NULL);
> -   free(data);
> +   free(tdata);
>  }
>
>  void
>
> Modified: trunk/elementary/src/lib/els_box.c
> ===================================================================
> --- trunk/elementary/src/lib/els_box.c  2011-05-26 09:02:00 UTC (rev 59698)
> +++ trunk/elementary/src/lib/els_box.c  2011-05-26 09:22:43 UTC (rev 59699)
> @@ -7,6 +7,7 @@
>    Evas_Coord minw, minh, mnw, mnh;
>    const Eina_List *l;
>    Evas_Object_Box_Option *opt;
> +   int c;
>
>    /* FIXME: need to calc max */
>    minw = 0;
> @@ -41,6 +42,12 @@
>                }
>           }
>      }
> +   c = eina_list_count(priv->children) - 1;
> +   if (c > 0)
> +     {
> +        if (horizontal) minw += priv->pad.h * c;
> +        else minh += priv->pad.v * c;
> +     }
>    evas_object_size_hint_min_set(box, minw, minh);
>  }
>
> @@ -62,6 +69,7 @@
>    evas_object_size_hint_min_get(o, &minw, &minh);
>    evas_object_size_hint_align_get(o, &ax, &ay);
>    count = eina_list_count(priv->children);
> +
>    if (w < minw)
>      {
>         x = x + ((w - minw) * (1.0 - ax));
> @@ -153,6 +161,7 @@
>                               yy + (Evas_Coord)(((double)(hh - oh)) * ay));
>              evas_object_resize(obj, ow, oh);
>              xx += ww;
> +             xx += priv->pad.h;
>           }
>         else
>           {
> @@ -185,6 +194,7 @@
>                               yy + (Evas_Coord)(((double)(hh - oh)) * ay));
>              evas_object_resize(obj, ow, oh);
>              yy += hh;
> +             yy += priv->pad.v;
>           }
>      }
>  }
>
>
> ------------------------------------------------------------------------------
> vRanger cuts backup time in half-while increasing security.
> With the market-leading solution for virtual backup and recovery,
> you get blazing-fast, flexible, and affordable data protection.
> Download your free trial now.
> http://p.sf.net/sfu/quest-d2dcopy1
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to