mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 02:37:01 +08:00
refactor(flex): change the name of teh built-in flex layouts
This commit is contained in:
@@ -9,7 +9,7 @@ void lv_example_flex_3(void)
|
||||
lv_obj_t * cont = lv_obj_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_size(cont, 300, 220);
|
||||
lv_obj_align(cont, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_layout(cont, &lv_flex_queue);
|
||||
lv_obj_set_layout(cont, &lv_flex_row_nowrap);
|
||||
|
||||
lv_obj_t * obj;
|
||||
obj = lv_obj_create(cont, NULL);
|
||||
|
||||
@@ -19,7 +19,7 @@ void lv_example_flex_5(void)
|
||||
lv_obj_t * cont = lv_obj_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_size(cont, 300, 220);
|
||||
lv_obj_align(cont, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_layout(cont, &lv_flex_inline);
|
||||
lv_obj_set_layout(cont, &lv_flex_row_wrap);
|
||||
|
||||
uint32_t i;
|
||||
for(i = 0; i < 9; i++) {
|
||||
|
||||
@@ -11,7 +11,7 @@ void lv_example_flex_6(void)
|
||||
lv_obj_set_base_dir(cont, LV_BIDI_DIR_RTL);
|
||||
lv_obj_set_size(cont, 300, 220);
|
||||
lv_obj_align(cont, NULL, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_obj_set_layout(cont, &lv_flex_center_column);
|
||||
lv_obj_set_layout(cont, &lv_flex_column_center);
|
||||
|
||||
uint32_t i;
|
||||
for(i = 0; i < 20; i++) {
|
||||
|
||||
@@ -19,7 +19,7 @@ void lv_example_scroll_2(void)
|
||||
lv_obj_t * panel = lv_obj_create(lv_scr_act(), NULL);
|
||||
lv_obj_set_size(panel, 280, 150);
|
||||
lv_obj_set_scroll_snap_x(panel, LV_SCROLL_SNAP_CENTER);
|
||||
lv_obj_set_layout(panel, &lv_flex_queue);
|
||||
lv_obj_set_layout(panel, &lv_flex_row_nowrap);
|
||||
lv_obj_center(panel);
|
||||
|
||||
uint32_t i;
|
||||
|
||||
@@ -10,7 +10,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event)
|
||||
|
||||
void lv_example_switch_1(void)
|
||||
{
|
||||
lv_obj_set_layout(lv_scr_act(), &lv_flex_center_column);
|
||||
lv_obj_set_layout(lv_scr_act(), &lv_flex_column_center);
|
||||
|
||||
lv_obj_t * sw;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user