1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Merge pull request #1459 from littlevgl/tabview_inactive

lv_tabview: respect tab button's inactive state
This commit is contained in:
Gabor Kiss-Vamosi 2020-04-17 14:52:43 +02:00 committed by GitHub
commit 202fca3d8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1006,6 +1006,8 @@ static void tab_btnm_event_cb(lv_obj_t * tab_btnm, lv_event_t event)
uint16_t btn_id = lv_btnm_get_active_btn(tab_btnm);
if(btn_id == LV_BTNM_BTN_NONE) return;
if(lv_btnm_get_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_INACTIVE)) return;
lv_btnm_clear_btn_ctrl_all(tab_btnm, LV_BTNM_CTRL_TGL_STATE);
lv_btnm_set_btn_ctrl(tab_btnm, btn_id, LV_BTNM_CTRL_TGL_STATE);