acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_flex_3.c (837B)
1 #include "../../lv_examples.h" 2 #if LV_USE_FLEX && LV_BUILD_EXAMPLES 3 4 /** 5 * Demonstrate flex grow. 6 */ 7 void lv_example_flex_3(void) 8 { 9 lv_obj_t * cont = lv_obj_create(lv_scr_act()); 10 lv_obj_set_size(cont, 300, 220); 11 lv_obj_center(cont); 12 lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW); 13 14 lv_obj_t * obj; 15 obj = lv_obj_create(cont); 16 lv_obj_set_size(obj, 40, 40); /*Fix size*/ 17 18 obj = lv_obj_create(cont); 19 lv_obj_set_height(obj, 40); 20 lv_obj_set_flex_grow(obj, 1); /*1 portion from the free space*/ 21 22 obj = lv_obj_create(cont); 23 lv_obj_set_height(obj, 40); 24 lv_obj_set_flex_grow(obj, 2); /*2 portion from the free space*/ 25 26 obj = lv_obj_create(cont); 27 lv_obj_set_size(obj, 40, 40); /*Fix size. It is flushed to the right by the "grow" items*/ 28 } 29 30 #endif