2012년 9월 24일 월요일에 Daniel Juyung Seo님이 작성:

> This looks good to me.
> Can you send a patch?
>

Thank you for your review.
I attached the patch file.

Thanks.
--
Jaehwan Kim.


> Daniel Juyung Seo (SeoZ)
>
> On Fri, Sep 21, 2012 at 4:22 PM, Jaehwan Kim 
> <jaehwan.kim....@gmail.com<javascript:;>>
> wrote:
> > Dear raster
> >
> > Yesterday, you discussed about toolbar with Seoz.
> > Currently the vertical length of the item is decided by the min value of
> > item.
> > (When the toolbar is horizontal mode)
> > If we want to expand the item according toolbar height, there's any API
> > which set the mode.
> > Since the toolbar has the horizontal/vertical mode, I can not use the
> word
> > horizontal.
> > So I decide the API name elm_toolbar_transverse_expanded_set/get.
> > Please review this name is proper.
> >
> > Thanks
> > --
> > Jaehwan Kim.
> >
> ------------------------------------------------------------------------------
> > Got visibility?
> > Most devs has no idea what their production app looks like.
> > Find out how fast your code is with AppDynamics Lite.
> > http://ad.doubleclick.net/clk;262219671;13503038;y?
> > http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net <javascript:;>
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net <javascript:;>
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
Index: src/lib/elm_toolbar.c
===================================================================
--- src/lib/elm_toolbar.c	(리비전 76930)
+++ src/lib/elm_toolbar.c	(작업 사본)
@@ -236,12 +236,12 @@ _resize_job(void *data)
 
         if (sd->vertical)
           {
-             evas_object_resize(sd->bx, w, vh);
+             h = vh;
              _items_visibility_fix(sd, &ih, vh, &more);
           }
         else
           {
-             evas_object_resize(sd->bx, vw, h);
+             w = vw;
              _items_visibility_fix(sd, &iw, vw, &more);
           }
         evas_object_geometry_get
@@ -316,12 +316,12 @@ _resize_job(void *data)
 
         if (sd->vertical)
           {
-             evas_object_resize(sd->bx, w, vh);
+             h = vh;
              _items_visibility_fix(sd, &ih, vh, &more);
           }
         else
           {
-             evas_object_resize(sd->bx, vw, h);
+             w = vw;
              _items_visibility_fix(sd, &iw, vw, &more);
           }
         evas_object_box_remove_all(sd->bx, EINA_FALSE);
@@ -353,12 +353,10 @@ _resize_job(void *data)
      {
         Evas_Coord iw = 0, ih = 0;
 
-        if ((vw >= mw) && (vh >= mh))
-          evas_object_resize(sd->bx, vw, vh);
-        else if (vw < mw)
-          evas_object_resize(sd->bx, mw, vh);
-        else if (vh < mh)
-          evas_object_resize(sd->bx, vw, mh);
+        if (sd->vertical)
+			h = (vh >= mh) ? vh : mh;
+		else
+			w = (vw >= mw) ? vw : mw;
 
         if (sd->vertical)
           _items_visibility_fix(sd, &ih, vh, &more);
@@ -389,11 +387,11 @@ _resize_job(void *data)
      {
         if (sd->vertical)
           {
-             if ((vh >= mh) && (h != vh)) evas_object_resize(sd->bx, w, vh);
+             if ((vh >= mh) && (h != vh)) h = vh;
           }
         else
           {
-             if ((vw >= mw) && (w != vw)) evas_object_resize(sd->bx, vw, h);
+             if ((vw >= mw) && (w != vw)) w = vw;
           }
         EINA_INLIST_FOREACH(sd->items, it)
           {
@@ -405,6 +403,16 @@ _resize_job(void *data)
           }
      }
 
+   if (sd->transverse_expanded)
+     {
+        if (sd->vertical)
+          w = vw;
+        else
+          h = vh;
+     }
+
+   evas_object_resize(sd->bx, w, h);
+
 // Remove the first or last separator since it is not neccessary
    list = evas_object_box_children_get(sd->bx_more);
    EINA_INLIST_FOREACH(sd->items, it)
@@ -840,8 +848,14 @@ _sizing_eval(Evas_Object *obj)
      {
         minw = minw_bx + (w - vw);
         minh = minh_bx + (h - vh);
-        if (minw_bx < vw) minw_bx = vw;
-        if (minh_bx < vh) minh_bx = vh;
+		if (sd->vertical)
+		{
+			if (minh_bx < vh) minh_bx = vh;
+		}
+		else
+		{
+			if (minw_bx < vw) minw_bx = vw;
+		}
      }
    else
      {
@@ -857,8 +871,16 @@ _sizing_eval(Evas_Object *obj)
           }
      }
 
+   if (sd->transverse_expanded)
+     {
+        if (sd->vertical)
+          minw_bx = vw;
+        else
+          minh_bx = vh;
+     }
+
    evas_object_resize(sd->bx, minw_bx, minh_bx);
-   evas_object_resize(sd->more, w, h);
+   evas_object_resize(sd->more, minw_bx, minh_bx);
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, -1, -1);
 
@@ -2648,6 +2670,27 @@ elm_toolbar_shrink_mode_get(const Evas_Object *obj
 }
 
 EAPI void
+elm_toolbar_transverse_expanded_set(Evas_Object *obj, Eina_Bool transverse_expanded)
+{
+   ELM_TOOLBAR_CHECK(obj);
+   ELM_TOOLBAR_DATA_GET(obj, sd);
+
+   if (sd->transverse_expanded == transverse_expanded) return;
+   sd->transverse_expanded = transverse_expanded;
+
+   _sizing_eval(obj);
+}
+
+EAPI Eina_Bool
+elm_toolbar_transverse_expanded_get(const Evas_Object *obj)
+{
+   ELM_TOOLBAR_CHECK(obj) EINA_FALSE;
+   ELM_TOOLBAR_DATA_GET(obj, sd);
+
+   return sd->transverse_expanded;
+}
+
+EAPI void
 elm_toolbar_homogeneous_set(Evas_Object *obj,
                             Eina_Bool homogeneous)
 {
Index: src/lib/elm_toolbar.h
===================================================================
--- src/lib/elm_toolbar.h	(리비전 76930)
+++ src/lib/elm_toolbar.h	(작업 사본)
@@ -610,6 +610,33 @@ EAPI void                         elm_toolbar_shri
 EAPI Elm_Toolbar_Shrink_Mode      elm_toolbar_shrink_mode_get(const Evas_Object *obj);
 
 /**
+ * Set the item's transverse expansion of a given toolbar widget @p obj.
+ *
+ * @param obj The toolbar object.
+ * @param transverse_expanded The transverse expansion of the item.
+ * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE)
+ *
+ * This will expand the transverse length of the item according the transverse length of the toolbar.
+ * The default is what the transverse length of the item is set according its min value.
+ *
+ * @ingroup Toolbar
+ */
+EAPI void                         elm_toolbar_transverse_expanded_set(Evas_Object *obj, Eina_Bool transverse_expanded);
+
+/**
+ * Get the transverse expansion of toolbar @p obj.
+ *
+ * @param obj The toolbar object.
+ * @return The transverse expansion of the item.
+ * (EINA_TRUE = on, EINA_FALSE = off, default = EINA_FALSE)
+ *
+ * @see elm_toolbar_transverse_expand_set() for details.
+ *
+ * @ingroup Toolbar
+ */
+EAPI Eina_Bool                    elm_toolbar_transverse_expanded_get(const Evas_Object *obj);
+
+/**
  * Enable/disable homogeneous mode.
  *
  * @param obj The toolbar object
Index: src/lib/elm_widget_toolbar.h
===================================================================
--- src/lib/elm_widget_toolbar.h	(리비전 76930)
+++ src/lib/elm_widget_toolbar.h	(작업 사본)
@@ -151,6 +151,7 @@ struct _Elm_Toolbar_Smart_Data
    Eina_Bool                             homogeneous : 1;
    Eina_Bool                             on_deletion : 1;
    Eina_Bool                             reorder_mode : 1;
+   Eina_Bool                             transverse_expanded : 1;
 };
 
 struct _Elm_Toolbar_Item
Index: src/bin/test_toolbar.c
===================================================================
--- src/bin/test_toolbar.c	(리비전 76930)
+++ src/bin/test_toolbar.c	(작업 사본)
@@ -831,6 +831,7 @@ test_toolbar8(void *data __UNUSED__, Evas_Object *
    tb = elm_toolbar_add(win);
    elm_toolbar_homogeneous_set(tb, EINA_FALSE);
    elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_EXPAND);
+   elm_toolbar_transverse_expanded_set(tb, EINA_TRUE);
    elm_toolbar_standard_priority_set(tb, 0);
    evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to