Enlightenment CVS committal Author : raster Project : e17 Module : libs/etk
Dir : e17/libs/etk/src/lib Modified Files: etk_scrolled_view.c etk_viewport.c etk_widget.c Log Message: the way viewports handled children meant you could NEVER align the child if smaller than the viewport. it was always centered. now u can pack an alignment in a viewport and use that to specify alignment. now default alignment is top-left as per most widget sets and viewport mechanisms. =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_scrolled_view.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- etk_scrolled_view.c 26 Jun 2008 03:47:54 -0000 1.37 +++ etk_scrolled_view.c 26 Jun 2008 06:03:49 -0000 1.38 @@ -568,7 +568,7 @@ } /* Check if reaching the boundary */ -static inline double _etk_scrolled_view_bounce_check (Etk_Range * range, double delta,double v) +static inline double _etk_scrolled_view_bounce_check(Etk_Range * range, double delta,double v) { double pos = (range->value + delta); if (pos <= range->lower) @@ -601,8 +601,8 @@ // Using trapezoid method to calculate the distance. delta_time = ecore_time_get() - drag->timestamp; - delta_V = delta_time * (drag->damping_magic + abs(drag->Vx)+ abs(drag->Vy))/2; - delta_time = delta_time < 0.01f ? 0.01f: delta_time; + delta_V = delta_time * (drag->damping_magic + abs(drag->Vx)+ abs(drag->Vy)) / 2; + delta_time = delta_time < 0.01 ? 0.01 : delta_time; if (drag->Vx < delta_V && drag->Vx > -delta_V) { @@ -716,9 +716,9 @@ hscrollbar_range = ETK_RANGE(scrolled_view->hscrollbar); drag->mouse_down = ETK_TRUE; drag->timestamp = ecore_time_get(); - drag->old_timestamp = 0.0f; - drag->Vx=0; - drag->Vy=0; + drag->old_timestamp = 0.0; + drag->Vx = 0; + drag->Vy = 0; drag->position = event->widget; drag->bar_position.x = hscrollbar_range->value; drag->bar_position.y = vscrollbar_range->value; =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_viewport.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- etk_viewport.c 19 Jun 2008 10:53:58 -0000 1.17 +++ etk_viewport.c 26 Jun 2008 06:03:49 -0000 1.18 @@ -117,19 +117,16 @@ Etk_Size child_requisition; etk_widget_size_request(child, &child_requisition); - - if (child_requisition.w <= geometry.w) - geometry.x += (geometry.w - child_requisition.w) / 2; - else + if (child_requisition.w > geometry.w) + { + geometry.w = child_requisition.w; geometry.x -= viewport->xscroll; - - if (child_requisition.h <= geometry.h) - geometry.y += (geometry.h - child_requisition.h) / 2; - else + } + if (child_requisition.h > geometry.h) + { + geometry.h = child_requisition.h; geometry.y -= viewport->yscroll; - - geometry.w = child_requisition.w; - geometry.h = child_requisition.h; + } etk_widget_size_allocate(child, geometry); } } =================================================================== RCS file: /cvs/e/e17/libs/etk/src/lib/etk_widget.c,v retrieving revision 1.131 retrieving revision 1.132 diff -u -3 -r1.131 -r1.132 --- etk_widget.c 13 Oct 2007 15:57:15 -0000 1.131 +++ etk_widget.c 26 Jun 2008 06:03:49 -0000 1.132 @@ -3524,7 +3524,7 @@ widget->inner_geometry.w = w; widget->inner_geometry.h = h; - evas_object_geometry_get(obj, &prev_w, &prev_h, NULL, NULL); + evas_object_geometry_get(obj, NULL, NULL, &prev_w, &prev_h); if ((prev_w != w || prev_h != h || widget->need_redraw) && widget->size_allocate) widget->size_allocate(widget, widget->inner_geometry); } ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs