imtk
diff src/listbox.c @ 20:c7a7ddbe7714
half-arsed automatic layout
author | John Tsiombikas <nuclear@siggraph.org> |
---|---|
date | Sat, 30 Apr 2011 05:23:59 +0300 |
parents | 11da537aeba6 |
children |
line diff
1.1 --- a/src/listbox.c Tue Apr 26 22:53:21 2011 +0300 1.2 +++ b/src/listbox.c Sat Apr 30 05:23:59 2011 +0300 1.3 @@ -29,6 +29,10 @@ 1.4 1.5 assert(id >= 0); 1.6 1.7 + if(x == IMTK_AUTO || y == IMTK_AUTO) { 1.8 + imtk_layout_get_pos(&x, &y); 1.9 + } 1.10 + 1.11 max_width = 0; 1.12 over = 0; 1.13 1.14 @@ -61,6 +65,7 @@ 1.15 } 1.16 1.17 draw(id, list, sel, x, y, max_width, nitems, over); 1.18 + imtk_layout_advance(max_width, ITEM_HEIGHT * nitems); 1.19 return sel; 1.20 } 1.21