minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-10 09:53:04 +02:00
parent bad4450795
commit f73e813562
3 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -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);
} }
} }
+1 -1
View File
@@ -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;