fix some examples
This commit is contained in:
@@ -17,8 +17,8 @@ static void event_handler(lv_event_t * e)
|
||||
void lv_example_calendar_1(void)
|
||||
{
|
||||
lv_obj_t * calendar = lv_calendar_create(lv_scr_act());
|
||||
lv_obj_set_size(calendar, 200, 200);
|
||||
lv_obj_align(calendar, LV_ALIGN_CENTER, 0, 20);
|
||||
lv_obj_set_size(calendar, 185, 185);
|
||||
lv_obj_align(calendar, LV_ALIGN_CENTER, 0, 27);
|
||||
lv_obj_add_event_cb(calendar, event_handler, LV_EVENT_ALL, NULL);
|
||||
|
||||
lv_calendar_set_today_date(calendar, 2021, 02, 23);
|
||||
|
||||
@@ -28,10 +28,12 @@ void lv_example_keyboard_1(void)
|
||||
lv_obj_align(ta, LV_ALIGN_TOP_LEFT, 10, 10);
|
||||
lv_obj_add_event_cb(ta, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
lv_textarea_set_placeholder_text(ta, "Hello");
|
||||
lv_obj_set_size(ta, 140, 80);
|
||||
|
||||
ta = lv_textarea_create(lv_scr_act());
|
||||
lv_obj_align(ta, LV_ALIGN_TOP_RIGHT, -10, 10);
|
||||
lv_obj_add_event_cb(ta, ta_event_cb, LV_EVENT_ALL, kb);
|
||||
lv_obj_set_size(ta, 140, 80);
|
||||
|
||||
lv_keyboard_set_textarea(kb, ta);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ C
|
||||
LED with custom style
|
||||
"""""""""""""""""""""
|
||||
|
||||
.. lv_example:: lv_ex_widgets/lv_ex_led/lv_ex_led_1
|
||||
.. lv_example:: widgets/led/lv_example_led_1
|
||||
:language: c
|
||||
|
||||
MicroPython
|
||||
|
||||
@@ -4,7 +4,7 @@ C
|
||||
Simple List
|
||||
""""""""""""""""
|
||||
|
||||
.. lv_example:: lv_ex_widgets/lv_ex_list/lv_ex_list_1
|
||||
.. lv_example:: widgets/list/lv_example_list_1
|
||||
:language: c
|
||||
|
||||
MicroPython
|
||||
|
||||
@@ -10,7 +10,7 @@ static void event_handler(lv_event_t * e)
|
||||
|
||||
void lv_example_win_1(void)
|
||||
{
|
||||
lv_obj_t * win = lv_win_create(lv_scr_act(), 60);
|
||||
lv_obj_t * win = lv_win_create(lv_scr_act(), 40);
|
||||
lv_obj_t * btn;
|
||||
btn = lv_win_add_btn(win, LV_SYMBOL_LEFT, 40);
|
||||
lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL);
|
||||
|
||||
Reference in New Issue
Block a user