Ticket #1982: 02_break_the_jail_of_none_scrolled_view_with_margins.patch

File 02_break_the_jail_of_none_scrolled_view_with_margins.patch, 1.0 KB (added by tick, 11 years ago)

Fix the known issue of first patch(remove unnecessary check)

  • etk/src/lib/etk_viewport.c

    commit 571a36e18c152beee2b4a882c026725431142e24
    Author: I-Fan, Chen <tick@openmoko.com>
    Date:   Tue Sep 16 23:47:25 2008 +0800
    
        remove unnecessary check, and let margin can work
    
    diff --git a/etk/src/lib/etk_viewport.c b/etk/src/lib/etk_viewport.c
    index 8de08f3..06fd146 100644
    a b static void _etk_viewport_size_allocate(Etk_Widget *widget, Etk_Geometry geometr 
    158158      Etk_Size child_requisition; 
    159159 
    160160      etk_widget_size_request(child, &child_requisition); 
    161       if (child_requisition.w > geometry.w) 
    162       { 
    163          geometry.w = child_requisition.w; 
    164          geometry.x -= viewport->xscroll; 
    165       } 
    166       if (child_requisition.h > geometry.h) 
    167       { 
    168          geometry.h = child_requisition.h; 
    169          geometry.y -= viewport->yscroll; 
    170       } 
     161 
     162      geometry.w = child_requisition.w; 
     163      geometry.x -= viewport->xscroll; 
     164 
     165      geometry.h = child_requisition.h; 
     166      geometry.y -= viewport->yscroll; 
     167 
    171168      etk_widget_size_allocate(child, geometry); 
    172169   } 
    173170}