[scroller] apply max size in calculating size of the scroller
authorMyungjae Lee <mjae.lee@samsung.com>
Mon, 22 Nov 2010 06:35:56 +0000 (15:35 +0900)
committerMyungjae Lee <mjae.lee@samsung.com>
Mon, 22 Nov 2010 06:35:56 +0000 (15:35 +0900)
src/lib/elm_scroller.c
src/modules/ctxpopup_copypasteUI/copypaste.c

index 1d60438..c0b74cb 100644 (file)
@@ -157,6 +157,11 @@ _sizing_eval(Evas_Object *obj)
         edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &vmw, &vmh);
         if (wd->min_w) w = vmw + minw;
         if (wd->min_h) h = vmh + minh;
+               
+        evas_object_size_hint_max_get(obj, &maxw, &maxh);
+        if ((maxw > 0) && (w > maxw)) w = maxw;
+        if ((maxh > 0) && (h > maxh)) h = maxh;
+
         evas_object_size_hint_min_set(obj, w, h);
      }
 }
index 239ac76..845a83f 100644 (file)
@@ -165,7 +165,7 @@ obj_longpress(Evas_Object *obj)
                        if (1) // need way to detect if someone has a selection
                                {
                                        if (ext_mod->editable)
-                                               elm_ctxpopup_item_add(ext_mod->popup, NULL, "Paste",    _paste, obj );
+                                               elm_ctxpopup_item_add(ext_mod->popup, NULL, "Paste",_paste, obj );
                                }
        //              elm_ctxpopup_item_add(wd->ctxpopup, NULL, "Selectall",_select_all, obj );
        // start for cbhm
@@ -182,6 +182,8 @@ obj_longpress(Evas_Object *obj)
                                                        elm_ctxpopup_item_add(ext_mod->popup, NULL, "Copy",_copy, obj );
                                                        if (ext_mod->editable)
                                                                elm_ctxpopup_item_add(ext_mod->popup, NULL, "Cut",_cut, obj );                                                  
+                                                       if (ext_mod->editable)
+                                                               elm_ctxpopup_item_add(ext_mod->popup, NULL, "Paste",_paste, obj );
                                                }
                                        else
                                                {