From cccb81f5d537ec2d6f0be081ac3ccfeba56a721f Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Fri, 16 Jul 2021 15:52:38 +0200 Subject: [PATCH] Add Tabview parts --- src/hasp/hasp_attribute.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index bd939f4b..2a61e6e8 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -339,6 +339,29 @@ static void hasp_attribute_get_part_state(lv_obj_t* obj, const char* attr_in, ch part = index <= LV_GAUGE_PART_NEEDLE ? index : LV_GAUGE_PART_MAIN; break; + case LV_HASP_TABVIEW: + switch(index) { + case 1: + state = LV_BTN_STATE_PRESSED; + break; + case 2: + state = LV_BTN_STATE_DISABLED; + break; + case 3: + state = LV_BTN_STATE_CHECKED_RELEASED; + break; + case 4: + state = LV_BTN_STATE_CHECKED_PRESSED; + break; + case 5: + state = LV_BTN_STATE_CHECKED_DISABLED; + break; + default: + state = LV_BTN_STATE_RELEASED; + } + part = LV_TABVIEW_PART_TAB_BG; + break; + default: part = LV_TABLE_PART_BG; }