extra margin for etk_scrolled_view

Tick Chen tick at openmoko.com
Wed Sep 17 20:42:39 CEST 2008


Hi E-devel List, 
  I just created a patch that adding extra vertical and horizontal margins for
etk scrolled view.

Sometime we may want to have some extra margin for a list (like ipod
touch does), and this patch provide this possiblility. 

After thinking for a while I think this part is much more scrolled_view
specific, I do not implement the scroll_margins_get and implement that
in etk_scrolled_view. Besides IMHO scroll_margins_get provide half
margins, it does not full fill my need. 
We may be able remove scroll_margins_get from etk_widget, since no one use it 
and it were little bit unfinished. 

There added four extra functions:
void        etk_scrolled_view_extra_vmargin_set(Etk_Scrolled_View
*scrolled_view, int margin);
int        etk_scrolled_view_extra_vmargin_get(Etk_Scrolled_View
*scrolled_view);
void        etk_scrolled_view_extra_hmargin_set(Etk_Scrolled_View
*scrolled_view, int margin);
int        etk_scrolled_view_extra_hmargin_get(Etk_Scrolled_View
*scrolled_view);

The default extra margin is 0. It wont effect anything if you do not
touch that function. 
You can setup the margin to vertical and horizontal with different
values. 

I also add some code to etk_scrolled_view_test.c.
It's very easy to use. 

Cheers, 
Tick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etk_scrolled_view_adding_scrolled_view_margins.patch
Type: text/x-diff
Size: 10221 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/devel/attachments/20080918/d527848e/attachment-0002.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/devel/attachments/20080918/d527848e/attachment-0002.pgp 


More information about the devel mailing list