discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=602b01b8b255479bef761f81b1bb2c324685d80b

commit 602b01b8b255479bef761f81b1bb2c324685d80b
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Nov 2 10:29:56 2016 -0400

    use only aspect hints for new pager gadget
    
    ref T4809
---
 src/modules/pager/gadget/pager.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/modules/pager/gadget/pager.c b/src/modules/pager/gadget/pager.c
index df621f8..c01f5ca 100644
--- a/src/modules/pager/gadget/pager.c
+++ b/src/modules/pager/gadget/pager.c
@@ -266,20 +266,14 @@ _pager_orient(Instance *inst, E_Gadget_Site_Orient orient)
      {
         aspect_w = inst->pager->ynum * inst->pager->zone->w;
         aspect_h = inst->pager->xnum * inst->pager->zone->h;
-        evas_object_size_hint_aspect_set(inst->o_pager, 
EVAS_ASPECT_CONTROL_HORIZONTAL, aspect_w, aspect_h);
+        evas_object_size_hint_aspect_set(inst->o_pager, 
EVAS_ASPECT_CONTROL_BOTH, aspect_w, aspect_h);
      }
    else
      {
         aspect_w = inst->pager->xnum * inst->pager->zone->w;
         aspect_h = inst->pager->ynum * inst->pager->zone->h;
-        evas_object_size_hint_aspect_set(inst->o_pager, 
EVAS_ASPECT_CONTROL_VERTICAL, aspect_w, aspect_h);
+        evas_object_size_hint_aspect_set(inst->o_pager, 
EVAS_ASPECT_CONTROL_BOTH, aspect_w, aspect_h);
      }
-   aspect_ratio = (double)aspect_w / (double)aspect_h;
-
-   if (aspect_ratio > 1.0)
-     evas_object_size_hint_min_set(inst->o_pager, 4 * aspect_ratio, 4);
-   else
-     evas_object_size_hint_min_set(inst->o_pager, 4, 4 * aspect_ratio);
 }
 
 static void
@@ -308,10 +302,6 @@ _pager_recalc(void *data)
    if ((p->inst) && (p->inst->o_pager))
      {
         _pager_orient(p->inst, 
e_gadget_site_orient_get(e_gadget_site_get(p->inst->o_pager)));
-        if (p->invert)
-          evas_object_size_hint_min_set(p->inst->o_pager, p->ynum * w, p->xnum 
* h);
-        else
-          evas_object_size_hint_min_set(p->inst->o_pager, p->xnum * w, p->ynum 
* h);
      }
 }
 
@@ -442,7 +432,6 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, 
Eina_Bool invert)
      edje_object_signal_emit(o, "e,name,show", "e");
 
    edje_object_size_min_calc(o, &w, &h);
-   evas_object_size_hint_min_set(o, w, h);
 
    E_EXPAND(o);
    E_FILL(o);

-- 


Reply via email to