minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-03 17:34:45 +02:00
parent 7b8de7af8a
commit 3bbe46f74f
3 changed files with 15 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ static void event_handler(lv_event_t * e)
if(code == LV_EVENT_VALUE_CHANGED) {
const char * txt = lv_checkbox_get_text(obj);
const char * state = lv_obj_get_state(obj) & LV_STATE_CHECKED ? "Checked" : "Unchecked";
LV_LOG_USER("%s: %s\n", txt, state);
LV_LOG_USER("%s: %s", txt, state);
}
}
@@ -34,7 +34,7 @@ void lv_example_checkbox_1(void)
cb = lv_checkbox_create(lv_scr_act());
lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED);
lv_checkbox_set_text(cb, "Melon");
lv_checkbox_set_text(cb, "Melon\nand a new line");
lv_obj_add_event_cb(cb, event_handler, LV_EVENT_ALL, NULL);
lv_obj_update_layout(cb);