rework ddlist
This commit is contained in:
@@ -951,7 +951,7 @@ static void indev_proc_release(lv_indev_proc_t * proc)
|
||||
parent = lv_obj_get_parent(parent);
|
||||
if(parent == NULL) break;
|
||||
|
||||
/*Ignore is the protected against click focus*/
|
||||
/*Ignore if the protected against click focus*/
|
||||
if(lv_obj_is_protected(parent, LV_PROTECT_CLICK_FOCUS)) {
|
||||
parent = NULL;
|
||||
break;
|
||||
@@ -973,13 +973,19 @@ static void indev_proc_release(lv_indev_proc_t * proc)
|
||||
/* Send defocus to the lastly "active" object and foucus to the new one.
|
||||
* Do not send the events if they was sent by the click focus*/
|
||||
if(proc->types.pointer.last_pressed != indev_obj_act && click_focus_sent == false) {
|
||||
lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
if(lv_obj_is_protected(indev_obj_act, LV_PROTECT_CLICK_FOCUS) == false) {
|
||||
lv_signal_send(proc->types.pointer.last_pressed, LV_SIGNAL_DEFOCUS, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
lv_event_send(proc->types.pointer.last_pressed, LV_EVENT_DEFOCUSED, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
lv_signal_send(proc->types.pointer.act_obj, LV_SIGNAL_FOCUS, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
lv_event_send(proc->types.pointer.act_obj, LV_EVENT_FOCUSED, NULL);
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
proc->types.pointer.last_pressed = indev_obj_act;
|
||||
proc->types.pointer.last_pressed = indev_obj_act;
|
||||
}
|
||||
}
|
||||
|
||||
if(indev_reset_check(proc)) return;
|
||||
|
||||
@@ -261,7 +261,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, const lv_obj_t * copy)
|
||||
|
||||
/*Set attributes*/
|
||||
new_obj->adv_hittest = 0;
|
||||
new_obj->click = parent ? 1 : 0;
|
||||
new_obj->click = 1;
|
||||
new_obj->drag = 0;
|
||||
new_obj->drag_throw = 0;
|
||||
new_obj->drag_parent = 0;
|
||||
@@ -1183,28 +1183,28 @@ void lv_obj_set_ext_click_area(lv_obj_t * obj, lv_coord_t left, lv_coord_t right
|
||||
|
||||
void lv_obj_set_style_color(lv_obj_t * obj, uint8_t part, lv_style_property_t prop, lv_color_t color)
|
||||
{
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
lv_style_list_set_local_color(style_dsc, prop, color);
|
||||
lv_obj_refresh_style(obj);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_int(lv_obj_t * obj, uint8_t part, lv_style_property_t prop, lv_style_int_t value)
|
||||
{
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
lv_style_list_set_local_int(style_dsc, prop, value);
|
||||
lv_obj_refresh_style(obj);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_opa(lv_obj_t * obj, uint8_t part, lv_style_property_t prop, lv_opa_t opa)
|
||||
{
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
lv_style_list_set_local_opa(style_dsc, prop, opa);
|
||||
lv_obj_refresh_style(obj);
|
||||
}
|
||||
|
||||
void lv_obj_set_style_ptr(lv_obj_t * obj, uint8_t part, lv_style_property_t prop, void * p)
|
||||
{
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
lv_style_list_set_local_ptr(style_dsc, prop, p);
|
||||
lv_obj_refresh_style(obj);
|
||||
}
|
||||
@@ -1213,7 +1213,7 @@ void lv_obj_add_style(lv_obj_t * obj, uint8_t part, lv_style_t * style)
|
||||
{
|
||||
if(style == NULL) return;
|
||||
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
if(style_dsc == NULL) {
|
||||
LV_LOG_WARN("lv_obj_add_style: can't find style with `type`");
|
||||
return;
|
||||
@@ -1233,7 +1233,7 @@ void lv_obj_add_theme(void * obj, uint8_t part, uint16_t name)
|
||||
|
||||
void lv_obj_reset_style(lv_obj_t * obj, uint8_t part)
|
||||
{
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style(obj, part);
|
||||
lv_style_list_t * style_dsc = lv_obj_get_style_list(obj, part);
|
||||
if(style_dsc == NULL) {
|
||||
LV_LOG_WARN("lv_obj_clean_styles: can't find style with `part`");
|
||||
return;
|
||||
@@ -1650,7 +1650,7 @@ void lv_obj_set_signal_cb(lv_obj_t * obj, lv_signal_cb_t signal_cb)
|
||||
*/
|
||||
lv_res_t lv_signal_send(lv_obj_t * obj, lv_signal_t signal, void * param)
|
||||
{
|
||||
LV_ASSERT_OBJ(obj, LV_OBJX_NAME);
|
||||
if(obj == NULL) return LV_RES_OK;
|
||||
|
||||
lv_res_t res = LV_RES_OK;
|
||||
if(obj->signal_cb) res = obj->signal_cb(obj, signal, param);
|
||||
@@ -2095,7 +2095,7 @@ lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj)
|
||||
* Appearance get
|
||||
*---------------*/
|
||||
|
||||
lv_style_list_t * lv_obj_get_style(const lv_obj_t * obj, uint8_t part)
|
||||
lv_style_list_t * lv_obj_get_style_list(const lv_obj_t * obj, uint8_t part)
|
||||
{
|
||||
if(part == LV_OBJ_PART_MAIN) return &((lv_obj_t*)obj)->style_list;
|
||||
|
||||
@@ -2891,6 +2891,10 @@ static lv_res_t lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param)
|
||||
lv_obj_clear_state(obj, LV_OBJ_STATE_FOCUS | LV_OBJ_STATE_EDIT);
|
||||
}
|
||||
#endif
|
||||
else if(sign == LV_SIGNAL_CLEANUP) {
|
||||
|
||||
lv_style_list_reset(&obj->style_list);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -2924,7 +2928,7 @@ static void report_style_mod_core(void * style, lv_obj_t * obj)
|
||||
{
|
||||
uint8_t part_sub;
|
||||
for(part_sub = 0; part_sub != _LV_OBJ_PART_ALL; part_sub++) {
|
||||
lv_style_list_t * dsc = lv_obj_get_style(obj, part_sub);
|
||||
lv_style_list_t * dsc = lv_obj_get_style_list(obj, part_sub);
|
||||
if(dsc == NULL) break;
|
||||
|
||||
uint8_t ci;
|
||||
@@ -3087,7 +3091,7 @@ static lv_style_int_t lv_obj_get_style_int_core(const lv_obj_t * obj, uint8_t pa
|
||||
lv_res_t res = LV_RES_INV;
|
||||
const lv_obj_t * parent = obj;
|
||||
while(parent) {
|
||||
lv_style_list_t * dsc = lv_obj_get_style(parent, part);
|
||||
lv_style_list_t * dsc = lv_obj_get_style_list(parent, part);
|
||||
|
||||
uint8_t state = lv_obj_get_state(parent, part);
|
||||
prop = (uint16_t)prop_ori + ((uint16_t)state << LV_STYLE_STATE_POS);
|
||||
@@ -3134,7 +3138,7 @@ static lv_color_t lv_obj_get_style_color_core(const lv_obj_t * obj, uint8_t part
|
||||
lv_res_t res = LV_RES_INV;
|
||||
const lv_obj_t * parent = obj;
|
||||
while(parent) {
|
||||
lv_style_list_t * dsc = lv_obj_get_style(parent, part);
|
||||
lv_style_list_t * dsc = lv_obj_get_style_list(parent, part);
|
||||
|
||||
uint8_t state = lv_obj_get_state(parent, part);
|
||||
prop = (uint16_t)prop_ori + ((uint16_t)state << LV_STYLE_STATE_POS);
|
||||
@@ -3177,7 +3181,7 @@ static lv_opa_t lv_obj_get_style_opa_core(const lv_obj_t * obj, uint8_t part, lv
|
||||
lv_res_t res = LV_RES_INV;
|
||||
const lv_obj_t * parent = obj;
|
||||
while(parent) {
|
||||
lv_style_list_t * dsc = lv_obj_get_style(parent, part);
|
||||
lv_style_list_t * dsc = lv_obj_get_style_list(parent, part);
|
||||
|
||||
uint8_t state = lv_obj_get_state(parent, part);
|
||||
prop = (uint16_t)prop_ori + ((uint16_t)state << LV_STYLE_STATE_POS);
|
||||
@@ -3222,7 +3226,7 @@ static const void * lv_obj_get_style_ptr_core(const lv_obj_t * obj, uint8_t part
|
||||
lv_res_t res = LV_RES_INV;
|
||||
const lv_obj_t * parent = obj;
|
||||
while(parent) {
|
||||
lv_style_list_t * dsc = lv_obj_get_style(parent, part);
|
||||
lv_style_list_t * dsc = lv_obj_get_style_list(parent, part);
|
||||
|
||||
uint8_t state = lv_obj_get_state(parent, part);
|
||||
prop = (uint16_t)prop_ori + ((uint16_t)state << LV_STYLE_STATE_POS);
|
||||
|
||||
@@ -879,7 +879,7 @@ lv_coord_t lv_obj_get_ext_draw_pad(const lv_obj_t * obj);
|
||||
* Appearance get
|
||||
*---------------*/
|
||||
|
||||
lv_style_list_t * lv_obj_get_style(const lv_obj_t * obj, uint8_t type);
|
||||
lv_style_list_t * lv_obj_get_style_list(const lv_obj_t * obj, uint8_t type);
|
||||
|
||||
lv_style_int_t lv_obj_get_style_int(const lv_obj_t * obj, uint8_t type, lv_style_property_t prop);
|
||||
|
||||
|
||||
@@ -146,6 +146,8 @@ lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
|
||||
disp->sys_layer = lv_obj_create(NULL, NULL); /*Create sys layer on the display*/
|
||||
lv_obj_reset_style(disp->top_layer, LV_OBJ_PART_MAIN);
|
||||
lv_obj_reset_style(disp->sys_layer, LV_OBJ_PART_MAIN);
|
||||
lv_obj_set_click(disp->top_layer, false);
|
||||
lv_obj_set_click(disp->sys_layer, false);
|
||||
|
||||
lv_obj_invalidate(disp->act_scr);
|
||||
|
||||
|
||||
@@ -356,7 +356,8 @@ lv_res_t lv_mem_test(void)
|
||||
lv_mem_ent_t * e;
|
||||
e = ent_get_next(NULL);
|
||||
while(e) {
|
||||
if(e->header.s.d_size > 20000) {
|
||||
if((e->header.s.used && e->header.s.d_size > 20000) ||
|
||||
(e->header.s.used == 0 && e->header.s.d_size > LV_MEM_SIZE)) {
|
||||
printf("mem err\n");
|
||||
while(1);
|
||||
return LV_RES_INV;
|
||||
|
||||
@@ -206,7 +206,7 @@ static lv_style_list_t * lv_cb_get_style(lv_obj_t * cb, uint8_t type)
|
||||
style_dsc_p = &cb->style_list;
|
||||
break;
|
||||
case LV_CB_PART_BULLET:
|
||||
style_dsc_p = lv_obj_get_style(ext->bullet, LV_BTN_PART_MAIN);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->bullet, LV_BTN_PART_MAIN);
|
||||
break;
|
||||
default:
|
||||
style_dsc_p = NULL;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ extern "C" {
|
||||
#error "lv_ddlist: lv_label is required. Enable it in lv_conf.h (LV_USE_LABEL 1) "
|
||||
#endif
|
||||
|
||||
#include "../lv_core/lv_obj.h"
|
||||
#include "../lv_objx/lv_btn.h"
|
||||
#include "../lv_objx/lv_page.h"
|
||||
#include "../lv_objx/lv_label.h"
|
||||
|
||||
@@ -37,28 +37,41 @@ extern "C" {
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
enum {
|
||||
LV_DDLIST_DIR_DOWN,
|
||||
LV_DDLIST_DIR_UP,
|
||||
LV_DDLIST_DIR_LEFT,
|
||||
LV_DDLIST_DIR_RIGHT,
|
||||
};
|
||||
|
||||
typedef uint8_t lv_ddlist_dir_t;
|
||||
|
||||
/*Data of drop down list*/
|
||||
typedef struct
|
||||
{
|
||||
lv_page_ext_t page; /*Ext. of ancestor*/
|
||||
lv_btn_ext_t btn; /*Ext. of ancestor*/
|
||||
/*New data for this type */
|
||||
lv_obj_t * label; /*Label for the options*/
|
||||
lv_style_list_t style_sel; /*Style of the selected option*/
|
||||
const char * symbol; /*Arrow or other icon when the drop-down list is closed*/
|
||||
lv_obj_t * page; /*The dropped down list*/
|
||||
const char * text; /*Text to display on the ddlist's button*/
|
||||
const char * symbol; /*Arrow or other icon when the drop-down list is closed*/
|
||||
const char * options;
|
||||
lv_style_list_t style_selected; /*Style of the selected option*/
|
||||
lv_style_list_t style_page; /*Style of the dropped down list*/
|
||||
lv_style_list_t style_scrlbar; /*Style of the scroll bar*/
|
||||
lv_coord_t max_height; /*Height of the ddlist when opened. (0: auto-size)*/
|
||||
uint16_t option_cnt; /*Number of options*/
|
||||
uint16_t sel_opt_id; /*Index of the current option*/
|
||||
uint16_t sel_opt_id_ori; /*Store the original index on focus*/
|
||||
lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/
|
||||
uint8_t opened : 1; /*1: The list is opened (handled by the library)*/
|
||||
uint8_t force_sel : 1; /*1: Keep the selection highlight even if the list is closed*/
|
||||
uint8_t stay_open : 1; /*1: Don't close the list when a new item is selected*/
|
||||
int16_t sel_opt_id; /*Index of the currently selected option*/
|
||||
int16_t sel_opt_id_orig; /*Store the original index on focus*/
|
||||
lv_ddlist_dir_t dir :2;
|
||||
uint8_t show_selected :1;
|
||||
} lv_ddlist_ext_t;
|
||||
|
||||
enum {
|
||||
LV_DDLIST_PART_BG,
|
||||
LV_DDLIST_PART_SCRL,
|
||||
LV_DDLIST_PART_BTN,
|
||||
LV_DDLIST_PART_LIST,
|
||||
LV_DDLIST_PART_SCRLBAR,
|
||||
LV_DDLIST_PART_SEL,
|
||||
LV_DDLIST_PART_SELECTED,
|
||||
};
|
||||
typedef uint8_t lv_ddlist_part_t;
|
||||
|
||||
@@ -93,20 +106,12 @@ void lv_ddlist_set_options(lv_obj_t * ddlist, const char * options);
|
||||
void lv_ddlist_set_selected(lv_obj_t * ddlist, uint16_t sel_opt);
|
||||
|
||||
/**
|
||||
* Set a fix height for the drop down list
|
||||
* Set a maximum height for the drop down list
|
||||
* If 0 then the opened ddlist will be auto. sized else the set height will be applied.
|
||||
* @param ddlist pointer to a drop down list
|
||||
* @param h the height when the list is opened (0: auto size)
|
||||
*/
|
||||
void lv_ddlist_set_fix_height(lv_obj_t * ddlist, lv_coord_t h);
|
||||
|
||||
/**
|
||||
* Set a fix width for the drop down list
|
||||
* @param ddlist pointer to a drop down list
|
||||
* @param w the width when the list is opened (0: auto size)
|
||||
*/
|
||||
void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w);
|
||||
|
||||
void lv_ddlist_set_max_height(lv_obj_t * ddlist, lv_coord_t h);
|
||||
|
||||
/**
|
||||
* Set an arrow or other symbol to display when the drop-down list is closed.
|
||||
@@ -114,12 +119,6 @@ void lv_ddlist_set_fix_width(lv_obj_t * ddlist, lv_coord_t w);
|
||||
* @param symbol a text like `LV_SYMBOL_DOWN` or NULL to not draw icon
|
||||
*/
|
||||
void lv_ddlist_set_symbol(lv_obj_t * ddlist, const char * symbol);
|
||||
/**
|
||||
* Leave the list opened when a new value is selected
|
||||
* @param ddlist pointer to drop down list object
|
||||
* @param en enable/disable "stay open" feature
|
||||
*/
|
||||
void lv_ddlist_set_stay_open(lv_obj_t * ddlist, bool en);
|
||||
|
||||
/**
|
||||
* Set the scroll bar mode of a drop down list
|
||||
@@ -141,11 +140,11 @@ static inline void lv_ddlist_set_anim_time(lv_obj_t * ddlist, uint16_t anim_time
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the alignment of the labels in a drop down list
|
||||
* Set the direction of the a drop down list
|
||||
* @param ddlist pointer to a drop down list object
|
||||
* @param align alignment of labels
|
||||
* @param dir LV_DDLIST_DIR_LEF/RIGHT/TOP/BOTTOM
|
||||
*/
|
||||
void lv_ddlist_set_align(lv_obj_t * ddlist, lv_label_align_t align);
|
||||
void lv_ddlist_set_dir(lv_obj_t * ddlist, lv_ddlist_dir_t dir);
|
||||
|
||||
/*=====================
|
||||
* Getter functions
|
||||
@@ -185,7 +184,7 @@ void lv_ddlist_get_selected_str(const lv_obj_t * ddlist, char * buf, uint16_t bu
|
||||
* @param ddlist pointer to a drop down list object
|
||||
* @return the height if the ddlist is opened (0: auto size)
|
||||
*/
|
||||
lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist);
|
||||
lv_coord_t lv_ddlist_get_max_height(const lv_obj_t * ddlist);
|
||||
|
||||
/**
|
||||
* Get the symbol to draw when the drop-down list is closed
|
||||
@@ -195,10 +194,11 @@ lv_coord_t lv_ddlist_get_fix_height(const lv_obj_t * ddlist);
|
||||
const char * lv_ddlist_get_symbol(lv_obj_t * ddlist);
|
||||
|
||||
/**
|
||||
* Get whether the drop down list stay open after selecting a value or not
|
||||
* Get the symbol to draw when the drop-down list is closed
|
||||
* @param ddlist pointer to drop down list object
|
||||
* @return the symbol or NULL if not enabled
|
||||
*/
|
||||
bool lv_ddlist_get_stay_open(lv_obj_t * ddlist);
|
||||
lv_ddlist_dir_t lv_ddlist_get_dir(const lv_obj_t * ddlist);
|
||||
|
||||
/**
|
||||
* Get the scroll bar mode of a drop down list
|
||||
|
||||
@@ -85,7 +85,7 @@ lv_obj_t * lv_lmeter_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
if(copy == NULL) {
|
||||
lv_obj_set_size(new_lmeter, LV_DPI, LV_DPI);
|
||||
|
||||
lv_style_list_reset(lv_obj_get_style(new_lmeter, LV_LMETER_PART_MAIN));
|
||||
lv_style_list_reset(lv_obj_get_style_list(new_lmeter, LV_LMETER_PART_MAIN));
|
||||
_ot(new_lmeter, LV_LMETER_PART_MAIN, LMETER);
|
||||
}
|
||||
/*Copy an existing line meter*/
|
||||
|
||||
@@ -154,7 +154,7 @@ void lv_mbox_add_btns(lv_obj_t * mbox, const char * btn_map[])
|
||||
lv_obj_add_theme(ext->btnm, LV_BTNM_PART_BG, LV_THEME_MBOX_BTN_BG);
|
||||
|
||||
|
||||
lv_style_list_reset(lv_obj_get_style(ext->btnm, LV_BTNM_PART_BTN));
|
||||
lv_style_list_reset(lv_obj_get_style_list(ext->btnm, LV_BTNM_PART_BTN));
|
||||
lv_obj_add_theme(ext->btnm, LV_BTNM_PART_BTN, LV_THEME_MBOX_BTN);
|
||||
}
|
||||
|
||||
@@ -484,10 +484,10 @@ static lv_style_list_t * lv_mbox_get_style(lv_obj_t * mbox, uint8_t part)
|
||||
style_dsc_p = &mbox->style_list;
|
||||
break;
|
||||
case LV_MBOX_PART_BTN_BG:
|
||||
style_dsc_p = ext->btnm ? lv_obj_get_style(ext->btnm, LV_BTNM_PART_BG) : NULL;
|
||||
style_dsc_p = ext->btnm ? lv_obj_get_style_list(ext->btnm, LV_BTNM_PART_BG) : NULL;
|
||||
break;
|
||||
case LV_MBOX_PART_BTN:
|
||||
style_dsc_p = ext->btnm ? lv_obj_get_style(ext->btnm, LV_BTNM_PART_BTN) : NULL;
|
||||
style_dsc_p = ext->btnm ? lv_obj_get_style_list(ext->btnm, LV_BTNM_PART_BTN) : NULL;
|
||||
break;
|
||||
default:
|
||||
style_dsc_p = NULL;
|
||||
|
||||
@@ -49,6 +49,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param);
|
||||
static lv_style_list_t * lv_page_get_style(lv_obj_t * page, uint8_t part);
|
||||
static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, void * param);
|
||||
static void scrl_def_event_cb(lv_obj_t * scrl, lv_event_t event);
|
||||
static void refr_ext_draw_pad(lv_obj_t * page);
|
||||
#if LV_USE_ANIMATION
|
||||
static void edge_flash_anim(void * page, lv_anim_value_t v);
|
||||
static void edge_flash_anim_end(lv_anim_t * a);
|
||||
@@ -759,6 +760,9 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
|
||||
parent_ext->scroll_prop_obj = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
lv_style_list_reset(&ext->sb.style);
|
||||
lv_style_list_reset(&ext->edge_flash.style);
|
||||
}
|
||||
/*Automatically move children to the scrollable object*/
|
||||
else if(sign == LV_SIGNAL_CHILD_CHG) {
|
||||
@@ -812,7 +816,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
|
||||
if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page);
|
||||
|
||||
/*Refresh the ext. size because the scrollbars might be positioned out of the page*/
|
||||
lv_obj_refresh_ext_draw_pad(page);
|
||||
refr_ext_draw_pad(page);
|
||||
} else if(sign == LV_SIGNAL_COORD_CHG) {
|
||||
/*Refresh the scrollbar and notify the scrl if the size is changed*/
|
||||
if(ext->scrl != NULL && (lv_obj_get_width(page) != lv_area_get_width(param) ||
|
||||
@@ -824,13 +828,7 @@ static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param)
|
||||
if(ext->sb.hor_draw || ext->sb.ver_draw) lv_page_sb_refresh(page);
|
||||
}
|
||||
} else if(sign == LV_SIGNAL_REFR_EXT_DRAW_PAD) {
|
||||
|
||||
lv_style_int_t sb_bottom = lv_obj_get_style_int(page, LV_PAGE_PART_SCRLBAR, LV_STYLE_PAD_BOTTOM);
|
||||
lv_style_int_t sb_right = lv_obj_get_style_int(page, LV_PAGE_PART_SCRLBAR, LV_STYLE_PAD_RIGHT);
|
||||
|
||||
/*Ensure ext. size for the scrollbars if they are out of the page*/
|
||||
if(page->ext_draw_pad < (-sb_right)) page->ext_draw_pad = -sb_right;
|
||||
if(page->ext_draw_pad < (-sb_bottom)) page->ext_draw_pad = -sb_bottom;
|
||||
refr_ext_draw_pad(page);
|
||||
} else if(sign == LV_SIGNAL_CONTROL) {
|
||||
uint32_t c = *((uint32_t *)param);
|
||||
|
||||
@@ -1062,7 +1060,7 @@ static lv_style_list_t * lv_page_get_style(lv_obj_t * page, uint8_t part)
|
||||
style_dsc_p = &page->style_list;
|
||||
break;
|
||||
case LV_PAGE_PART_SCRL:
|
||||
style_dsc_p = lv_obj_get_style(ext->scrl, LV_CONT_PART_MAIN);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->scrl, LV_CONT_PART_MAIN);
|
||||
break;
|
||||
case LV_PAGE_PART_SCRLBAR:
|
||||
style_dsc_p = &ext->sb.style;
|
||||
@@ -1208,6 +1206,16 @@ static void lv_page_sb_refresh(lv_obj_t * page)
|
||||
}
|
||||
}
|
||||
|
||||
static void refr_ext_draw_pad(lv_obj_t * page)
|
||||
{
|
||||
lv_style_int_t sb_bottom = lv_obj_get_style_int(page, LV_PAGE_PART_SCRLBAR, LV_STYLE_PAD_BOTTOM);
|
||||
lv_style_int_t sb_right = lv_obj_get_style_int(page, LV_PAGE_PART_SCRLBAR, LV_STYLE_PAD_RIGHT);
|
||||
|
||||
/*Ensure ext. size for the scrollbars if they are out of the page*/
|
||||
if(page->ext_draw_pad < (-sb_right)) page->ext_draw_pad = -sb_right;
|
||||
if(page->ext_draw_pad < (-sb_bottom)) page->ext_draw_pad = -sb_bottom;
|
||||
}
|
||||
|
||||
#if LV_USE_ANIMATION
|
||||
static void edge_flash_anim(void * page, lv_anim_value_t v)
|
||||
{
|
||||
|
||||
@@ -110,7 +110,7 @@ lv_obj_t * lv_roller_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
|
||||
lv_obj_set_signal_cb(scrl, lv_roller_scrl_signal);
|
||||
|
||||
lv_style_list_reset(lv_obj_get_style(roller, LV_PAGE_PART_SCRL));
|
||||
lv_style_list_reset(lv_obj_get_style_list(roller, LV_PAGE_PART_SCRL));
|
||||
lv_theme_apply(roller, LV_THEME_ROLLER);
|
||||
|
||||
refr_height(roller);
|
||||
|
||||
@@ -1556,7 +1556,7 @@ static lv_style_list_t * lv_ta_get_style(lv_obj_t * ta, uint8_t part)
|
||||
break;
|
||||
#endif
|
||||
case LV_TA_PART_PLACEHOLDER:
|
||||
style_dsc_p = ext->placeholder ? lv_obj_get_style(ext->placeholder, LV_LABEL_PART_MAIN) : NULL;
|
||||
style_dsc_p = ext->placeholder ? lv_obj_get_style_list(ext->placeholder, LV_LABEL_PART_MAIN) : NULL;
|
||||
break;
|
||||
default:
|
||||
style_dsc_p = NULL;
|
||||
|
||||
@@ -133,7 +133,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
lv_page_set_sb_mode(ext->content, LV_SB_MODE_OFF);
|
||||
lv_obj_set_drag_dir(lv_page_get_scrl(ext->content), LV_DRAG_DIR_ONE);
|
||||
|
||||
lv_style_list_reset(lv_obj_get_style(ext->content, LV_PAGE_PART_BG));
|
||||
lv_style_list_reset(lv_obj_get_style_list(ext->content, LV_PAGE_PART_BG));
|
||||
|
||||
lv_theme_apply(tabview, LV_THEME_TABVIEW);
|
||||
|
||||
@@ -156,9 +156,9 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
ext->tab_name_ptr[0] = "";
|
||||
lv_btnm_set_map(ext->btns, ext->tab_name_ptr);
|
||||
|
||||
lv_style_list_copy(lv_obj_get_style(tabview, LV_TABVIEW_PART_BG_SCRL), lv_obj_get_style(copy, LV_TABVIEW_PART_BG_SCRL));
|
||||
lv_style_list_copy(lv_obj_get_style(tabview, LV_TABVIEW_PART_TAB_BG), lv_obj_get_style(copy, LV_TABVIEW_PART_TAB_BG));
|
||||
lv_style_list_copy(lv_obj_get_style(tabview, LV_TABVIEW_PART_TAB), lv_obj_get_style(copy, LV_TABVIEW_PART_TAB));
|
||||
lv_style_list_copy(lv_obj_get_style_list(tabview, LV_TABVIEW_PART_BG_SCRL), lv_obj_get_style_list(copy, LV_TABVIEW_PART_BG_SCRL));
|
||||
lv_style_list_copy(lv_obj_get_style_list(tabview, LV_TABVIEW_PART_TAB_BG), lv_obj_get_style_list(copy, LV_TABVIEW_PART_TAB_BG));
|
||||
lv_style_list_copy(lv_obj_get_style_list(tabview, LV_TABVIEW_PART_TAB), lv_obj_get_style_list(copy, LV_TABVIEW_PART_TAB));
|
||||
|
||||
uint16_t i;
|
||||
lv_obj_t * new_tab;
|
||||
@@ -166,8 +166,8 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
for(i = 0; i < copy_ext->tab_cnt; i++) {
|
||||
new_tab = lv_tabview_add_tab(tabview, copy_ext->tab_name_ptr[i]);
|
||||
copy_tab = lv_tabview_get_tab(copy, i);
|
||||
lv_style_list_copy(lv_obj_get_style(new_tab, LV_PAGE_PART_SCRL), lv_obj_get_style(copy_tab, LV_PAGE_PART_SCRL));
|
||||
lv_style_list_copy(lv_obj_get_style(new_tab, LV_PAGE_PART_SCRLBAR), lv_obj_get_style(copy_tab, LV_PAGE_PART_SCRLBAR));
|
||||
lv_style_list_copy(lv_obj_get_style_list(new_tab, LV_PAGE_PART_SCRL), lv_obj_get_style_list(copy_tab, LV_PAGE_PART_SCRL));
|
||||
lv_style_list_copy(lv_obj_get_style_list(new_tab, LV_PAGE_PART_SCRLBAR), lv_obj_get_style_list(copy_tab, LV_PAGE_PART_SCRLBAR));
|
||||
lv_obj_refresh_style(new_tab);
|
||||
}
|
||||
|
||||
@@ -740,16 +740,16 @@ static lv_style_list_t * lv_tabview_get_style(lv_obj_t * tabview, uint8_t part)
|
||||
style_dsc_p = &tabview->style_list;
|
||||
break;
|
||||
case LV_TABVIEW_PART_BG_SCRL:
|
||||
style_dsc_p = lv_obj_get_style(ext->content, LV_PAGE_PART_SCRL);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->content, LV_PAGE_PART_SCRL);
|
||||
break;
|
||||
case LV_TABVIEW_PART_TAB_BG:
|
||||
style_dsc_p = lv_obj_get_style(ext->btns, LV_BTNM_PART_BG);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->btns, LV_BTNM_PART_BG);
|
||||
break;
|
||||
case LV_TABVIEW_PART_TAB:
|
||||
style_dsc_p = lv_obj_get_style(ext->btns, LV_BTNM_PART_BTN);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->btns, LV_BTNM_PART_BTN);
|
||||
break;
|
||||
case LV_TABVIEW_PART_INDIC:
|
||||
style_dsc_p = lv_obj_get_style(ext->indic, LV_OBJ_PART_MAIN);
|
||||
style_dsc_p = lv_obj_get_style_list(ext->indic, LV_OBJ_PART_MAIN);
|
||||
break;
|
||||
default:
|
||||
style_dsc_p = NULL;
|
||||
|
||||
@@ -60,10 +60,8 @@ typedef enum {
|
||||
|
||||
LV_THEME_PAGE,
|
||||
|
||||
LV_THEME_DDLIST_BG,
|
||||
LV_THEME_DDLIST_SCRL,
|
||||
LV_THEME_DDLIST_SCRLBAR,
|
||||
LV_THEME_DDLIST_SEL,
|
||||
LV_THEME_DDLIST,
|
||||
LV_THEME_DDLIST_PAGE,
|
||||
|
||||
LV_THEME_ROLLER,
|
||||
|
||||
|
||||
@@ -637,79 +637,79 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
switch(name) {
|
||||
case LV_THEME_SCR:
|
||||
list = lv_obj_get_style(obj, LV_OBJ_PART_MAIN);
|
||||
list = lv_obj_get_style_list(obj, LV_OBJ_PART_MAIN);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &scr);
|
||||
break;
|
||||
case LV_THEME_OBJ:
|
||||
list = lv_obj_get_style(obj, LV_OBJ_PART_MAIN);
|
||||
list = lv_obj_get_style_list(obj, LV_OBJ_PART_MAIN);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &panel);
|
||||
break;
|
||||
case LV_THEME_BTN:
|
||||
list = lv_obj_get_style(obj, LV_BTN_PART_MAIN);
|
||||
list = lv_obj_get_style_list(obj, LV_BTN_PART_MAIN);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btn);
|
||||
break;
|
||||
|
||||
case LV_THEME_BTNM:
|
||||
list = lv_obj_get_style(obj, LV_BTNM_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_BTNM_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btnm_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_BTNM_PART_BTN);
|
||||
list = lv_obj_get_style_list(obj, LV_BTNM_PART_BTN);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btnm_btn);
|
||||
break;
|
||||
case LV_THEME_BAR:
|
||||
list = lv_obj_get_style(obj, LV_BAR_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_BAR_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_BAR_PART_INDIC);
|
||||
list = lv_obj_get_style_list(obj, LV_BAR_PART_INDIC);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_indic);
|
||||
break;
|
||||
|
||||
case LV_THEME_SW:
|
||||
list = lv_obj_get_style(obj, LV_SW_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_SW_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_SW_PART_INDIC);
|
||||
list = lv_obj_get_style_list(obj, LV_SW_PART_INDIC);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_indic);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_SW_PART_KNOB);
|
||||
list = lv_obj_get_style_list(obj, LV_SW_PART_KNOB);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &sw_knob);
|
||||
break;
|
||||
|
||||
#if LV_USE_IMG
|
||||
case LV_THEME_IMAGE:
|
||||
list = lv_obj_get_style(obj, LV_IMG_PART_MAIN);
|
||||
list = lv_obj_get_style_list(obj, LV_IMG_PART_MAIN);
|
||||
lv_style_list_reset(list);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if LV_USE_LABEL
|
||||
case LV_THEME_LABEL:
|
||||
list = lv_obj_get_style(obj, LV_LABEL_PART_MAIN);
|
||||
list = lv_obj_get_style_list(obj, LV_LABEL_PART_MAIN);
|
||||
lv_style_list_reset(list);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if LV_USE_SLIDER
|
||||
case LV_THEME_SLIDER:
|
||||
list = lv_obj_get_style(obj, LV_SLIDER_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_SLIDER_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_SLIDER_PART_INDIC);
|
||||
list = lv_obj_get_style_list(obj, LV_SLIDER_PART_INDIC);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &bar_indic);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_SLIDER_PART_KNOB);
|
||||
list = lv_obj_get_style_list(obj, LV_SLIDER_PART_KNOB);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &slider_knob);
|
||||
break;
|
||||
@@ -717,54 +717,54 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
#if LV_USE_CB
|
||||
case LV_THEME_CB:
|
||||
list = lv_obj_get_style(obj, LV_CB_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_CB_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &cb_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_CB_PART_BULLET);
|
||||
list = lv_obj_get_style_list(obj, LV_CB_PART_BULLET);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &cb_bullet);
|
||||
break;
|
||||
#endif
|
||||
#if LV_USE_PAGE
|
||||
case LV_THEME_PAGE:
|
||||
list = lv_obj_get_style(obj, LV_PAGE_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_PAGE_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &panel);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_PAGE_PART_SCRL);
|
||||
list = lv_obj_get_style_list(obj, LV_PAGE_PART_SCRL);
|
||||
lv_style_list_reset(list);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_PAGE_PART_SCRLBAR);
|
||||
list = lv_obj_get_style_list(obj, LV_PAGE_PART_SCRLBAR);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &sb);
|
||||
break;
|
||||
#endif
|
||||
#if LV_USE_TABVIEW
|
||||
case LV_THEME_TABVIEW:
|
||||
list = lv_obj_get_style(obj, LV_TABVIEW_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_TABVIEW_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &scr);
|
||||
list = lv_obj_get_style(obj, LV_TABVIEW_PART_BG_SCRL);
|
||||
list = lv_obj_get_style_list(obj, LV_TABVIEW_PART_BG_SCRL);
|
||||
lv_style_list_reset(list);
|
||||
list = lv_obj_get_style(obj, LV_TABVIEW_PART_TAB_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_TABVIEW_PART_TAB_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &tabview_btns_bg);
|
||||
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABVIEW_PART_INDIC);
|
||||
list = lv_obj_get_style_list(obj, LV_TABVIEW_PART_INDIC);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &tabview_indic);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABVIEW_PART_TAB);
|
||||
list = lv_obj_get_style_list(obj, LV_TABVIEW_PART_TAB);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &tabview_btns);
|
||||
break;
|
||||
|
||||
case LV_THEME_TABVIEW_PAGE:
|
||||
list = lv_obj_get_style(obj, LV_PAGE_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_PAGE_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
list = lv_obj_get_style(obj, LV_PAGE_PART_SCRL);
|
||||
list = lv_obj_get_style_list(obj, LV_PAGE_PART_SCRL);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &tabaview_page_scrl);
|
||||
|
||||
@@ -773,11 +773,31 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
#if LV_USE_ROLLER
|
||||
case LV_THEME_ROLLER:
|
||||
list = lv_obj_get_style(obj, LV_ROLLER_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_ROLLER_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &panel);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_ROLLER_PART_SEL);
|
||||
list = lv_obj_get_style_list(obj, LV_ROLLER_PART_SEL);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btn);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if LV_USE_DDLIST
|
||||
case LV_THEME_DDLIST:
|
||||
list = lv_obj_get_style_list(obj, LV_DDLIST_PART_BTN);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btn);
|
||||
|
||||
list = lv_obj_get_style_list(obj, LV_DDLIST_PART_LIST);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &panel);
|
||||
|
||||
list = lv_obj_get_style_list(obj, LV_DDLIST_PART_SCRLBAR);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &sb);
|
||||
|
||||
list = lv_obj_get_style_list(obj, LV_DDLIST_PART_SELECTED);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &btn);
|
||||
break;
|
||||
@@ -785,37 +805,37 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
#if LV_USE_CHART
|
||||
case LV_THEME_CHART:
|
||||
list = lv_obj_get_style(obj, LV_CHART_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_CHART_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &panel);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_CHART_PART_SERIES_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_CHART_PART_SERIES_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &chart_series_bg);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_CHART_PART_SERIES);
|
||||
list = lv_obj_get_style_list(obj, LV_CHART_PART_SERIES);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &chart_series);
|
||||
break;
|
||||
#endif
|
||||
#if LV_USE_TABLE
|
||||
case LV_THEME_TABLE:
|
||||
list = lv_obj_get_style(obj, LV_TABLE_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_TABLE_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABLE_PART_CELL1);
|
||||
list = lv_obj_get_style_list(obj, LV_TABLE_PART_CELL1);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &table_cell);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABLE_PART_CELL2);
|
||||
list = lv_obj_get_style_list(obj, LV_TABLE_PART_CELL2);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &table_cell);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABLE_PART_CELL3);
|
||||
list = lv_obj_get_style_list(obj, LV_TABLE_PART_CELL3);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &table_cell);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TABLE_PART_CELL4);
|
||||
list = lv_obj_get_style_list(obj, LV_TABLE_PART_CELL4);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &table_cell);
|
||||
break;
|
||||
@@ -823,19 +843,19 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
|
||||
#if LV_USE_TA
|
||||
case LV_THEME_TA_ONELINE:
|
||||
list = lv_obj_get_style(obj, LV_TA_PART_BG);
|
||||
list = lv_obj_get_style_list(obj, LV_TA_PART_BG);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &ta_oneline);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TA_PART_PLACEHOLDER);
|
||||
list = lv_obj_get_style_list(obj, LV_TA_PART_PLACEHOLDER);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &ta_placeholder);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TA_PART_CURSOR);
|
||||
list = lv_obj_get_style_list(obj, LV_TA_PART_CURSOR);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &ta_cursor);
|
||||
|
||||
list = lv_obj_get_style(obj, LV_TA_PART_SCRLBAR);
|
||||
list = lv_obj_get_style_list(obj, LV_TA_PART_SCRLBAR);
|
||||
lv_style_list_reset(list);
|
||||
lv_style_list_add_style(list, &sb);
|
||||
break;
|
||||
@@ -851,12 +871,6 @@ void lv_theme_alien_apply(lv_obj_t * obj, lv_theme_style_t name)
|
||||
lv_style_t * lv_theme_alien_get_style(lv_theme_style_t name)
|
||||
{
|
||||
switch(name) {
|
||||
#if LV_USE_DDLIST
|
||||
case LV_THEME_DDLIST_SCRL:
|
||||
return NULL;
|
||||
case LV_THEME_DDLIST_SEL:
|
||||
return &btn;
|
||||
#endif
|
||||
#if LV_USE_LMETER
|
||||
case LV_THEME_LMETER:
|
||||
return &lmeter;
|
||||
|
||||
Reference in New Issue
Block a user