mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-01 00:51:49 +08:00
minor fixes
This commit is contained in:
@@ -4,7 +4,13 @@ C
|
|||||||
Simple Roller
|
Simple Roller
|
||||||
""""""""""""""""
|
""""""""""""""""
|
||||||
|
|
||||||
.. lv_example:: lv_ex_widgets/lv_ex_roller/lv_ex_roller_1
|
.. lv_example:: widgets/roller/lv_example_roller_1
|
||||||
|
:language: c
|
||||||
|
|
||||||
|
Styling the roller
|
||||||
|
""""""""""""""""""
|
||||||
|
|
||||||
|
.. lv_example:: widgets/roller/lv_example_roller_2
|
||||||
:language: c
|
:language: c
|
||||||
|
|
||||||
MicroPython
|
MicroPython
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ static void event_handler(lv_event_t * e)
|
|||||||
if(code == LV_EVENT_VALUE_CHANGED) {
|
if(code == LV_EVENT_VALUE_CHANGED) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
lv_roller_get_selected_str(obj, buf, sizeof(buf));
|
lv_roller_get_selected_str(obj, buf, sizeof(buf));
|
||||||
LV_LOG_USER("Selected value: %s\n", buf);
|
LV_LOG_USER("Selected value: %s", buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ static void draw_main(lv_event_t * e)
|
|||||||
|
|
||||||
lv_state_t cell_state = LV_STATE_DEFAULT;
|
lv_state_t cell_state = LV_STATE_DEFAULT;
|
||||||
if(row == table->row_act && col == table->col_act) {
|
if(row == table->row_act && col == table->col_act) {
|
||||||
if(obj->state & LV_STATE_PRESSED) cell_state |= LV_STATE_PRESSED;
|
if(!(obj->state & LV_STATE_SCROLLED) && (obj->state & LV_STATE_PRESSED)) cell_state |= LV_STATE_PRESSED;
|
||||||
if(obj->state & LV_STATE_FOCUSED) cell_state |= LV_STATE_FOCUSED;
|
if(obj->state & LV_STATE_FOCUSED) cell_state |= LV_STATE_FOCUSED;
|
||||||
if(obj->state & LV_STATE_FOCUS_KEY) cell_state |= LV_STATE_FOCUS_KEY;
|
if(obj->state & LV_STATE_FOCUS_KEY) cell_state |= LV_STATE_FOCUS_KEY;
|
||||||
if(obj->state & LV_STATE_EDITED) cell_state |= LV_STATE_EDITED;
|
if(obj->state & LV_STATE_EDITED) cell_state |= LV_STATE_EDITED;
|
||||||
|
|||||||
Reference in New Issue
Block a user