Ticket #1982: 03_remove_half_done_function_pointer.patch

File 03_remove_half_done_function_pointer.patch, 2.0 KB (added by tick, 11 years ago)

(Optional) remove half done function about margin

  • etk/src/lib/etk_scrolled_view.c

    commit 452b85c2756858a1cfcc52fde7fb9b577594866d
    Author: I-Fan, Chen <tick@openmoko.com>
    Date:   Tue Sep 16 23:52:24 2008 +0800
    
        remove scroll_margins_get, it only do half margins.
    
    diff --git a/etk/src/lib/etk_scrolled_view.c b/etk/src/lib/etk_scrolled_view.c
    index b381dcc..3dbde1f 100644
    a b static void _etk_scrolled_view_size_allocate(Etk_Widget *widget, Etk_Geometry ge 
    551551 
    552552   scrollview_size.w = geometry.w - child->inset.left - child->inset.right; 
    553553   scrollview_size.h = geometry.h - child->inset.top - child->inset.bottom; 
    554    if (child->scroll_margins_get) 
    555    { 
    556       Etk_Size margins_size; 
    557  
    558       child->scroll_margins_get(child, &margins_size); 
    559       scrollview_size.w -= margins_size.w; 
    560       scrollview_size.h -= margins_size.h; 
    561    } 
    562554 
    563555   child->scroll_size_get(child, scrollview_size, scrollbar_size, &scroll_size); 
    564556   scroll_size.w += 2 * scrolled_view->extra_hmargin; 
  • etk/src/lib/etk_widget.c

    diff --git a/etk/src/lib/etk_widget.c b/etk/src/lib/etk_widget.c
    index 1823fbf..49be779 100644
    a b static void _etk_widget_constructor(Etk_Widget *widget) 
    20072007   widget->size_allocate = NULL; 
    20082008   widget->theme_signal_emit = NULL; 
    20092009   widget->scroll_size_get = NULL; 
    2010    widget->scroll_margins_get = NULL; 
    20112010   widget->scroll = NULL; 
    20122011 
    20132012   widget->realized = ETK_FALSE; 
  • etk/src/lib/etk_widget.h

    diff --git a/etk/src/lib/etk_widget.h b/etk/src/lib/etk_widget.h
    index 2fe7b01..ed06f00 100644
    a b struct Etk_Widget 
    128128   void (*theme_signal_emit)(Etk_Widget *widget, const char *signal, Etk_Bool size_recalc); 
    129129 
    130130   void (*scroll_size_get)(Etk_Widget *widget, Etk_Size scrollview_size, Etk_Size scrollbar_size, Etk_Size *scroll_size); 
    131    void (*scroll_margins_get)(Etk_Widget *widget, Etk_Size *margin_size); 
    132131   void (*scroll)(Etk_Widget *widget, int x, int y); 
    133132 
    134133   Etk_Bool (*shown_handler)(Etk_Widget *widget);