BigW Consortium Gitlab

Commit 893475ad by Gabor Kiss-Vamosi

Hide anti aliasing. No x << LV_AA rewuired from now

parent 8bd9ab7b
......@@ -28,7 +28,7 @@
/* Horizontal and vertical resolution of the library.
* Screen resolution multiplied by LV_DOWN_SCALE*/
#define LV_DPI (100 << LV_ANTIALIAS)
#define LV_DPI 100
/* Buffered rendering: >= lv_disp_hor_res() or 0 to disable buffering*/
#define LV_VDB_SIZE (40 * lv_disp_hor_res())
......@@ -59,7 +59,7 @@
/*Input device settings*/
#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points*/
#define LV_INDEV_DRAG_LIMIT (10 << LV_ANTIALIAS) /*Drag threshold in pixels */
#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */
#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
......@@ -152,7 +152,7 @@
*==================*/
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
#define LV_OBJ_GROUP 1 /*Enable object groups (for keyboards)*/
#define USE_LV_GROUP 1 /*Enable object groups (for keyboards)*/
/*==================
* LV OBJ X USAGE
......@@ -165,7 +165,7 @@
/*Label (dependencies: -*/
#define USE_LV_LABEL 1
#if USE_LV_LABEL != 0
#define LV_LABEL_SCROLL_SPEED (25 << LV_ANTIALIAS) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#endif
/*Image (dependencies: lv_label (if symbols are enabled) from misc: FSINT, UFS)*/
......
......@@ -7,7 +7,7 @@
* INCLUDES
*********************/
#include "lv_group.h"
#if LV_OBJ_GROUP != 0
#if USE_LV_GROUP != 0
#include <stddef.h>
/*********************
......@@ -267,4 +267,4 @@ static void style_mod_def(lv_style_t * style)
style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
}
#endif /*LV_OBJ_GROUP != 0*/
#endif /*USE_LV_GROUP != 0*/
......@@ -30,7 +30,7 @@ extern "C" {
#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/
#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/
#if LV_OBJ_GROUP != 0
#if USE_LV_GROUP != 0
/**********************
* TYPEDEFS
**********************/
......@@ -125,7 +125,7 @@ lv_obj_t * lv_group_get_focused(lv_group_t * group);
* MACROS
**********************/
#endif /*LV_OBJ_GROUP != 0*/
#endif /*USE_LV_GROUP != 0*/
#ifdef __cplusplus
} /* extern "C" */
......
......@@ -128,7 +128,7 @@ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj)
lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y);
}
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/**
* Set a destination group for a keypad input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
......@@ -227,19 +227,19 @@ static void indev_proc_task(void * param)
(i->proc.last_point.x != data.point.x ||
i->proc.last_point.y != data.point.y))
{
lv_obj_set_pos_scale(i->cursor, data.point.x, data.point.y);
lv_obj_set_pos(i->cursor, data.point.x, data.point.y);
}
if(i->driver.type == LV_INDEV_TYPE_POINTER)
{
i->proc.act_point.x = data.point.x << LV_ANTIALIAS;
i->proc.act_point.y = data.point.y << LV_ANTIALIAS;
i->proc.act_point.x = data.point.x;
i->proc.act_point.y = data.point.y;;
/*Process the current point*/
indev_proc_point(&i->proc);
}
else if (i->driver.type == LV_INDEV_TYPE_KEYPAD) {
#if LV_OBJ_GROUP
#if USE_LV_GROUP
if(i->group != NULL && data.key != 0 &&
data.state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_REL)
{
......@@ -289,10 +289,10 @@ static void indev_proc_point(lv_indev_proc_t * indev)
if(indev->event == LV_INDEV_STATE_PR){
#if LV_INDEV_POINT_MARKER != 0
area_t area;
area.x1 = (indev->act_point.x >> LV_ANTIALIAS) - (LV_INDEV_POINT_MARKER >> 1);
area.y1 = (indev->act_point.y >> LV_ANTIALIAS) - (LV_INDEV_POINT_MARKER >> 1);
area.x2 = (indev->act_point.x >> LV_ANTIALIAS) + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
area.y2 = (indev->act_point.y >> LV_ANTIALIAS) + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
area.x1 = indev->act_point.x - (LV_INDEV_POINT_MARKER >> 1);
area.y1 = indev->act_point.y - (LV_INDEV_POINT_MARKER >> 1);
area.x2 = indev->act_point.x + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
area.y2 = indev->act_point.y + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
lv_rfill(&area, NULL, LV_COLOR_MAKE(0xFF, 0, 0), LV_OPA_COVER);
#endif
indev_proc_press(indev);
......
......@@ -66,7 +66,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable);
*/
void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj);
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/**
* Set a destination group for a keypad input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
......
......@@ -64,16 +64,16 @@ void lv_init(void)
/*Initialize the lv_misc modules*/
lv_mem_init();
lv_task_init();
#if USE_LV_FILESYSTEM
lv_fs_init();
lv_ufs_init();
#endif
lv_font_init();
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_init();
#endif
/*Clear the screen*/
lv_area_t scr_area;
lv_area_set(&scr_area, 0, 0, LV_HOR_RES, LV_VER_RES);
lv_rfill(&scr_area, NULL, LV_COLOR_BLACK, LV_OPA_COVER);
/*Init. the sstyles*/
lv_style_init();
......@@ -146,7 +146,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
new_obj->free_ptr = NULL;
#endif
#if LV_OBJ_GROUP
#if USE_LV_GROUP
new_obj->group_p = NULL;
#endif
/*Set attributes*/
......@@ -191,7 +191,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
#if LV_OBJ_FREE_PTR != 0
new_obj->free_ptr = NULL;
#endif
#if LV_OBJ_GROUP
#if USE_LV_GROUP
new_obj->group_p = NULL;
#endif
......@@ -229,7 +229,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
new_obj->style_p = copy->style_p;
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/*Add to the same group*/
if(copy->group_p != NULL) {
lv_group_add_obj(copy->group_p, new_obj);
......@@ -274,7 +274,7 @@ lv_res_t lv_obj_del(lv_obj_t * obj)
/*Set i to the next node*/
i = i_next;
}
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Remove the animations from this object*/
lv_anim_del(obj, NULL);
#endif
......@@ -905,7 +905,7 @@ void lv_obj_set_free_ptr(lv_obj_t * obj, void * free_p)
}
#endif
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Animate an object
* @param obj pointer to an object to animate
......@@ -1204,7 +1204,7 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj)
par = par->par;
}
}
#if LV_OBJ_GROUP
#if USE_LV_GROUP
if(obj->group_p) {
if(lv_group_get_focused(obj->group_p) == obj) {
style_act = lv_group_mod_style(obj->group_p, style_act);
......@@ -1361,7 +1361,7 @@ void * lv_obj_get_free_ptr(lv_obj_t * obj)
}
#endif
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/**
* Get the group of the object
* @param obj pointer to an object
......@@ -1532,12 +1532,12 @@ static void delete_children(lv_obj_t * obj)
}
/*Remove the animations from this object*/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_del(obj, NULL);
#endif
/*Delete from the group*/
#if LV_OBJ_GROUP
#if USE_LV_GROUP
if(obj->group_p != NULL) lv_group_remove_obj(obj);
#endif
......
......@@ -264,18 +264,6 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
/**
* Set relative the position of an object (relative to the parent).
* The coordinates will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param x new distance from the left side of the parent.
* @param y new distance from the top of the parent.
*/
static inline void lv_obj_set_pos_scale(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
{
lv_obj_set_pos(obj, x << LV_ANTIALIAS, y << LV_ANTIALIAS);
}
/**
* Set the x coordinate of a object
* @param obj pointer to an object
* @param x new distance from the left side from the parent
......@@ -283,17 +271,6 @@ static inline void lv_obj_set_pos_scale(lv_obj_t * obj, lv_coord_t x, lv_coord_t
void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x);
/**
* Set the x coordinate of a object.
* The coordinate will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param x new distance from the left side from the parent.
*/
static inline void lv_obj_set_x_scale(lv_obj_t * obj, lv_coord_t x)
{
lv_obj_set_x(obj, x << LV_ANTIALIAS);
}
/**
* Set the y coordinate of a object
* @param obj pointer to an object
* @param y new distance from the top of the parent
......@@ -301,17 +278,6 @@ static inline void lv_obj_set_x_scale(lv_obj_t * obj, lv_coord_t x)
void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y);
/**
* Set the y coordinate of a object.
* The coordinate will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param y new distance from the top of the parent.
*/
static inline void lv_obj_set_y_scale(lv_obj_t * obj, lv_coord_t y)
{
lv_obj_set_y(obj, y << LV_ANTIALIAS);
}
/**
* Set the size of an object
* @param obj pointer to an object
* @param w new width
......@@ -320,18 +286,6 @@ static inline void lv_obj_set_y_scale(lv_obj_t * obj, lv_coord_t y)
void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h);
/**
* Set the size of an object.
* The coordinates will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param w new width
* @param h new height
*/
static inline void lv_obj_set_size_scale(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
{
lv_obj_set_size(obj, w << LV_ANTIALIAS, h << LV_ANTIALIAS);
}
/**
* Set the width of an object
* @param obj pointer to an object
* @param w new width
......@@ -339,17 +293,6 @@ static inline void lv_obj_set_size_scale(lv_obj_t * obj, lv_coord_t w, lv_coord_
void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w);
/**
* Set the width of an object.
* The coordinates will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param w new width
*/
static inline void lv_obj_set_width_scale(lv_obj_t * obj, lv_coord_t w)
{
lv_obj_set_width(obj, w << LV_ANTIALIAS);
}
/**
* Set the height of an object
* @param obj pointer to an object
* @param h new height
......@@ -357,17 +300,6 @@ static inline void lv_obj_set_width_scale(lv_obj_t * obj, lv_coord_t w)
void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h);
/**
* Set the height of an object.
* The coordinate will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object
* @param h new height
*/
static inline void lv_obj_set_height_scale(lv_obj_t * obj, lv_coord_t h)
{
lv_obj_set_height(obj, h << LV_ANTIALIAS);
}
/**
* Align an object to an other object.
* @param obj pointer to an object to align
* @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
......@@ -377,19 +309,6 @@ static inline void lv_obj_set_height_scale(lv_obj_t * obj, lv_coord_t h)
*/
void lv_obj_align(lv_obj_t * obj,lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod);
/**
* Align an object to an other object.
* The coordinates will be up scaled LV_ANTIALIAS is enabled.
* @param obj pointer to an object to align
* @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
* @param align type of alignment (see 'lv_align_t' enum)
* @param x_mod x coordinate shift after alignment
* @param y_mod y coordinate shift after alignment
*/
static inline void lv_obj_align_scale(lv_obj_t * obj,lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod)
{
lv_obj_align(obj, base, align, x_mod << LV_ANTIALIAS, y_mod << LV_ANTIALIAS);
}
/*---------------------
* Appearance set
......@@ -530,7 +449,7 @@ void lv_obj_set_free_num(lv_obj_t * obj, LV_OBJ_FREE_NUM_TYPE free_num);
void lv_obj_set_free_ptr(lv_obj_t * obj, void * free_p);
#endif
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Animate an object
* @param obj pointer to an object to animate
......@@ -774,7 +693,7 @@ LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(lv_obj_t * obj);
void * lv_obj_get_free_ptr(lv_obj_t * obj);
#endif
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/**
* Get the group of the object
* @param obj pointer to an object
......
......@@ -258,13 +258,13 @@ static void lv_refr_area_no_vdb(const lv_area_t * area_p)
static void lv_refr_area_with_vdb(const lv_area_t * area_p)
{
/*Calculate the max row num*/
lv_coord_t max_row = (uint32_t) LV_VDB_SIZE / (lv_area_get_width(area_p));
if(max_row > lv_area_get_height(area_p)) max_row = lv_area_get_height(area_p);
lv_coord_t w = lv_area_get_width(area_p);
lv_coord_t h = lv_area_get_height(area_p);
/*Round the row number with downscale*/
#if LV_ANTIALIAS == 1
max_row &= (~0x1);
#endif
lv_coord_t max_row = (uint32_t) LV_VDB_SIZE / (w << LV_AA);
if(max_row > (h << LV_AA)) max_row = (h << LV_AA);
max_row = max_row >> LV_AA ;
/*Always use the full row*/
lv_coord_t row;
......@@ -310,6 +310,13 @@ static void lv_refr_area_part_vdb(const lv_area_t * area_p)
lv_area_t start_mask;
lv_area_union(&start_mask, area_p, &vdb_p->area);
#if LV_ANTIALIAS
vdb_p->area.x1 = vdb_p->area.x1 << LV_AA;
vdb_p->area.x2 = (vdb_p->area.x2 << LV_AA) + 1;
vdb_p->area.y1 = (vdb_p->area.y1 << LV_AA);
vdb_p->area.y2 = (vdb_p->area.y2 << LV_AA) + 1;
#endif
/*Get the most top object which is not covered by others*/
top_p = lv_refr_get_top_obj(&start_mask, lv_scr_act());
......
......@@ -14,7 +14,7 @@
/*********************
* DEFINES
*********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
#define LV_STYLE_ANIM_RES 256
#define LV_STYLE_ANIM_SHIFT 8 /*log2(LV_STYLE_ANIM_RES)*/
......@@ -25,7 +25,7 @@
/**********************
* TYPEDEFS
**********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
typedef struct {
lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it will be modified too*/
lv_style_t style_end;
......@@ -37,7 +37,7 @@ typedef struct {
/**********************
* STATIC PROTOTYPES
**********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val);
static void style_animation_common_end_cb(void *ptr);
#endif
......@@ -97,8 +97,8 @@ void lv_style_init (void)
lv_style_scr.text.opa = LV_OPA_COVER;
lv_style_scr.text.color = LV_COLOR_MAKE(0x30, 0x30, 0x30);
lv_style_scr.text.font = LV_FONT_DEFAULT;
lv_style_scr.text.letter_space = 1 << LV_ANTIALIAS;
lv_style_scr.text.line_space = 2 << LV_ANTIALIAS;
lv_style_scr.text.letter_space = 2;
lv_style_scr.text.line_space = 2;
lv_style_scr.image.opa = LV_OPA_COVER;
lv_style_scr.image.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
......@@ -106,7 +106,7 @@ void lv_style_init (void)
lv_style_scr.line.opa = LV_OPA_COVER;
lv_style_scr.line.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_scr.line.width = 1 << LV_ANTIALIAS;
lv_style_scr.line.width = 1;
/*Plain style (by default near the same as the screen style)*/
memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t));
......@@ -216,7 +216,7 @@ void lv_style_copy(lv_style_t * dest, const lv_style_t * src)
memcpy(dest, src, sizeof(lv_style_t));
}
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Create an animation from a pre-configured 'lv_style_anim_t' variable
* @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied)
......@@ -251,7 +251,7 @@ void lv_style_anim_create(lv_style_anim_t * anim)
/**********************
* STATIC FUNCTIONS
**********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Used by the style animations to set the values of a style according to start and end style.
* @param dsc the 'animated variable' set by lv_style_anim_create()
......
......@@ -101,7 +101,7 @@ typedef struct
}line;
}lv_style_t;
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
typedef struct {
const lv_style_t * style_start; /*Pointer to the starting style*/
const lv_style_t * style_end; /*Pointer to the destination style*/
......@@ -147,7 +147,7 @@ void lv_style_init (void);
*/
void lv_style_copy(lv_style_t * dest, const lv_style_t * src);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Create an animation from a pre-configured 'lv_style_anim_t' variable
* @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied)
......
......@@ -94,9 +94,6 @@ void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t col
void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_color_t color, lv_opa_t opa)
{
static lv_color_t color_array_tmp[LV_VER_RES]; /*Used by 'sw_color_fill'*/
static lv_coord_t last_width = -1;
lv_area_t res_a;
bool union_ok;
lv_vdb_t * vdb_p = lv_vdb_get();
......@@ -120,8 +117,12 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
/*Move the vdb_tmp to the first row*/
vdb_buf_tmp += vdb_width * vdb_rel_a.y1;
lv_coord_t w = lv_area_get_width(&vdb_rel_a);
#if USE_LV_GPU
static lv_color_t color_array_tmp[LV_HOR_RES << LV_ANTIALIAS]; /*Used by 'sw_color_fill'*/
static lv_coord_t last_width = -1;
lv_coord_t w = lv_area_get_width(&vdb_rel_a);
/*Don't use hw. acc. for every small fill (because of the init overhead)*/
if(w < VFILL_HW_ACC_SIZE_LIMIT) {
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
......@@ -158,6 +159,7 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
else {
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
}
}
/*Fill with opacity*/
else {
......@@ -182,7 +184,11 @@ void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
else {
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
}
}
#else
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
#endif
}
/**
......@@ -268,7 +274,6 @@ void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
map2_p ++;
}
if(px_cnt != 0) {
if(opa == LV_OPA_COVER) *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, 63*px_cnt);
else *vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, opa_tmp * px_cnt);
......@@ -368,11 +373,15 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_coord_t map_useful_w = lv_area_get_width(&masked_a);
for(row = masked_a.y1; row <= masked_a.y2; row++) {
#if USE_LV_GPU
if(lv_disp_is_mem_blend_supported() == false) {
sw_mem_blend(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
} else {
lv_disp_mem_blend(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
}
#else
sw_mem_blend(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
#endif
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
......@@ -468,6 +477,7 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
vdb_buf_tmp[vdb_col2 + 1].full = map_p[map_col].full;
}
map_p += map_width;
vdb_buf_tmp += 2 * vdb_width ; /*+ 2 row on the VDB (2 rows are filled because of the upscale)*/
......@@ -539,6 +549,7 @@ static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t len
*/
static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa)
{
/*Set all row in vdb to the given color*/
lv_coord_t row;
lv_coord_t col;
......
......@@ -51,8 +51,12 @@ void lv_disp_drv_init(lv_disp_drv_t *driver)
{
driver->disp_fill = NULL;
driver->disp_map = NULL;
driver->disp_flush = NULL;
#if USE_LV_GPU
driver->mem_blend = NULL;
driver->mem_fill = NULL;
#endif
}
/**
......@@ -160,6 +164,8 @@ void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_
if(active->driver.disp_map != NULL) active->driver.disp_map(x1, y1, x2, y2, color_map);
}
#if USE_LV_GPU
/**
* Blend pixels to a destination memory from a source memory
* In 'lv_disp_drv_t' 'mem_blend' is optional. (NULL if not available)
......@@ -207,6 +213,7 @@ bool lv_disp_is_mem_fill_supported(void)
if(active->driver.mem_fill) return true;
else return false;
}
#endif
/**********************
* STATIC FUNCTIONS
......
......@@ -41,11 +41,14 @@ typedef struct _disp_drv_t {
/*Write pixel map (e.g. image) to the display*/
void (*disp_map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p);
#if USE_LV_GPU
/*Blend two memories using opacity (GPU only)*/
void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
/*Fill a memory with a color (GPU only)*/
void (*mem_fill)(lv_color_t * dest, uint32_t length, lv_color_t color);
#endif
} lv_disp_drv_t;
typedef struct _disp_t {
......@@ -122,6 +125,7 @@ void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t col
*/
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map);
#if USE_LV_GPU
/**
* Blend pixels to a destination memory from a source memory
* In 'lv_disp_drv_t' 'mem_blend' is optional. (NULL if not available)
......@@ -152,7 +156,7 @@ bool lv_disp_is_mem_blend_supported(void);
* @return false: 'mem_fill' is not supported in the drover; true: 'mem_fill' is supported in the driver
*/
bool lv_disp_is_mem_fill_supported(void);
#endif
/**********************
* MACROS
**********************/
......
......@@ -8,7 +8,7 @@
*********************/
#include "lv_anim.h"
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
#include <stddef.h>
#include <string.h>
#include "../lv_hal/lv_hal_tick.h"
......
......@@ -15,7 +15,7 @@ extern "C" {
* INCLUDES
*********************/
#include "../../lv_conf.h"
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
#include <stdint.h>
#include <stdbool.h>
......
......@@ -81,7 +81,7 @@ static inline uint8_t lv_font_get_height(const lv_font_t * font_p)
*/
static inline uint8_t lv_font_get_height_scale(const lv_font_t * font_p)
{
return font_p->height_row >> LV_FONT_ANTIALIAS;
return (font_p->height_row >> LV_FONT_ANTIALIAS) >> LV_ANTIALIAS;
}
......@@ -101,7 +101,7 @@ uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter);
*/
static inline uint8_t lv_font_get_width_scale(const lv_font_t * font_p, uint32_t letter)
{
return lv_font_get_width(font_p, letter) >> LV_FONT_ANTIALIAS;
return (lv_font_get_width(font_p, letter) >> LV_FONT_ANTIALIAS) >> LV_ANTIALIAS;
}
/**********************
......
......@@ -7,6 +7,8 @@
* INCLUDES
*********************/
#include "lv_fs.h"
#if USE_LV_FILESYSTEM
#include "lv_ll.h"
#include <string.h>
......@@ -536,3 +538,5 @@ static lv_fs_drv_t* lv_fs_get_drv(char letter)
return NULL;
}
#endif /*USE_LV_FILESYSTEM*/
......@@ -14,6 +14,10 @@ extern "C" {
/*********************
* INCLUDES
*********************/
#include "../../lv_conf.h"
#if USE_LV_FILESYSTEM
#include <stdint.h>
#include <stdbool.h>
#include "lv_mem.h"
......@@ -235,8 +239,10 @@ const char * lv_fs_get_last(const char * path);
* MACROS
**********************/
#endif /*USE_LV_FILESYSTEM*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif
#endif /*LV_FS_H*/
......@@ -49,6 +49,7 @@ static bool is_break_char(uint32_t letter);
void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font,
lv_coord_t letter_space, lv_coord_t line_space, lv_coord_t max_width, lv_txt_flag_t flag)
{
size_res->x = 0;
size_res->y = 0;
......@@ -104,7 +105,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
if(flag & LV_TXT_FLAG_EXPAND) max_width = LV_COORD_MAX;
uint32_t i = 0;
lv_coord_t act_l = 0;
lv_coord_t cur_w = 0;
uint32_t last_break = NO_BREAK_FOUND;
lv_txt_cmd_state_t cmd_state = LV_TXT_CMD_STATE_WAIT;
uint32_t letter = 0;
......@@ -128,10 +129,10 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
return i; /*Return with the first letter of the next line*/
} else { /*Check the actual length*/
act_l += lv_font_get_width_scale(font, letter);
cur_w += lv_font_get_width_scale(font, letter);
/*If the txt is too long then finish, this is the line end*/
if(act_l > max_width) {
if(cur_w > max_width) {
/*If this a break char then break here.*/
if(is_break_char(letter)) {
/* Now 'i' points to the next char because of txt_utf8_next()
......@@ -139,11 +140,11 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
* Hence do nothing here*/
}
/*If already a break character is found, then break there*/
else if(last_break != NO_BREAK_FOUND ) {
if(last_break != NO_BREAK_FOUND ) {
i = last_break;
} else {
/* Now this character is out of the area but 'i' points to the next char because of txt_utf8_next()
* So step back one char*/
/* Now this character is out of the area so it will be first character of the next line*/
/* But 'i' already points to the next character (because of lv_txt_utf8_next) step beck one*/
lv_txt_utf8_prev(txt, &i);
}
......@@ -160,7 +161,7 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
}
}
act_l += letter_space;
cur_w += letter_space;
}
return i;
......
......@@ -115,7 +115,7 @@ void lv_bar_set_value(lv_obj_t * bar, int16_t value)
lv_obj_invalidate(bar);
}
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/**
* Set a new value with animation on the bar
* @param bar pointer to a bar object
......
......@@ -247,7 +247,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig
if(mode == LV_DESIGN_COVER_CHK) {
return ancestor_bullet_design(bullet, mask, mode);
} else if(mode == LV_DESIGN_DRAW_MAIN) {
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/* If the check box is the active in a group and
* the background is not visible (transparent or empty)
* then activate the style of the bullet*/
......@@ -265,7 +265,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig
#endif
ancestor_bullet_design(bullet, mask, mode);
#if LV_OBJ_GROUP
#if USE_LV_GROUP
bullet->style_p = style_ori; /*Revert the style*/
#endif
} else if(mode == LV_DESIGN_DRAW_POST) {
......
......@@ -75,7 +75,7 @@ lv_obj_t * lv_chart_create(lv_obj_t * par, lv_obj_t * copy)
ext->type = LV_CHART_TYPE_LINE;
ext->series.opa = LV_OPA_COVER;
ext->series.dark = LV_OPA_50;
ext->series.width = 2 << LV_ANTIALIAS;
ext->series.width = 2;
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_func(new_chart);
if(ancestor_signal == NULL) ancestor_signal = lv_obj_get_signal_func(new_chart);
......
......@@ -22,7 +22,7 @@
* DEFINES
*********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
# ifndef LV_DDLIST_DEF_ANIM_TIME
# define LV_DDLIST_DEF_ANIM_TIME 200 /*ms*/
# endif
......@@ -607,7 +607,7 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, uint16_t anim_time)
lv_obj_set_height(ddlist, new_height);
lv_ddlist_pos_current_option(ddlist);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = ddlist;
a.start = lv_obj_get_height(ddlist);
......
......@@ -146,11 +146,10 @@ void lv_img_set_file(lv_obj_t * img, const char * fn)
ext->w = header.w;
ext->h = header.h;
ext->transp = header.transp;
#if LV_ANTIALIAS != 0
if(ext->upscale != 0) {
ext->w *= 2;
ext->h *= 2;
#if LV_ANTIALIAS
if(ext->upscale == false) {
ext->w = ext->w >> LV_AA;
ext->h = ext->h >> LV_AA;
}
#endif
}
......
......@@ -21,7 +21,7 @@
*********************/
/*Test configurations*/
#ifndef LV_LABEL_SCROLL_SPEED
#define LV_LABEL_SCROLL_SPEED (25 << LV_ANTIALIAS) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL' mode*/
#define LV_LABEL_SCROLL_SPEED (25) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#endif
#define ANIM_WAIT_CHAR_COUNT 3
......@@ -40,7 +40,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_
static void lv_label_refr_text(lv_obj_t * label);
static void lv_label_revert_dots(lv_obj_t *label);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x);
static void lv_label_set_offset_y(lv_obj_t * label, lv_coord_t y);
#endif
......@@ -223,7 +223,7 @@ void lv_label_set_long_mode(lv_obj_t * label, lv_label_long_mode_t long_mode)
{
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Delete the old animation (if exists)*/
lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_x);
lv_anim_del(label, (lv_anim_fp_t) lv_obj_set_y);
......@@ -629,7 +629,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_
lv_style_t * style = lv_obj_get_style(label);
lv_obj_get_coords(label, &cords);
#if LV_OBJ_GROUP
#if USE_LV_GROUP
lv_group_t * g = lv_obj_get_group(label);
if(lv_group_get_focused(g) == label) {
lv_draw_rect(&cords, mask, style);
......@@ -641,7 +641,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_
if(ext->body_draw) lv_draw_rect(&cords, mask, style);
/*TEST: draw a background for the label*/
// lv_vfill(&label->coords, mask, LV_COLOR_LIME, LV_OPA_COVER);
// lv_draw_rect(&label->coords, mask, &lv_style_plain_color);
lv_txt_flag_t flag = LV_TXT_FLAG_NONE;
if(ext->recolor != 0) flag |= LV_TXT_FLAG_RECOLOR;
......@@ -730,7 +730,7 @@ static void lv_label_refr_text(lv_obj_t * label)
/*Start scrolling if the label is greater then its parent*/
if(ext->long_mode == LV_LABEL_LONG_SCROLL) {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_obj_t * parent = lv_obj_get_parent(label);
/*Delete the potential previous scroller animations*/
......@@ -766,7 +766,7 @@ static void lv_label_refr_text(lv_obj_t * label)
}
/*In roll mode keep the size but start offset animations*/
else if(ext->long_mode == LV_LABEL_LONG_ROLL) {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t anim;
anim.var = label;
anim.repeat = 1;
......@@ -887,7 +887,7 @@ static void lv_label_revert_dots(lv_obj_t *label)
ext->dot_end = LV_LABEL_DOT_END_INV;
}
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x)
{
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
......
......@@ -63,7 +63,6 @@ lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy)
ext->point_array = NULL;
ext->auto_size = 1;
ext->y_inv = 0;
ext->upscale = 0;
lv_obj_set_design_func(new_line, lv_line_design);
lv_obj_set_signal_func(new_line, lv_line_signal);
......@@ -79,7 +78,6 @@ lv_obj_t * lv_line_create(lv_obj_t * par, lv_obj_t * copy)
lv_line_set_auto_size(new_line,lv_line_get_auto_size(copy));
lv_line_set_y_invert(new_line,lv_line_get_y_inv(copy));
lv_line_set_auto_size(new_line,lv_line_get_auto_size(copy));
lv_line_set_upscale(new_line,lv_line_get_upscale(copy));
lv_line_set_points(new_line, copy_ext->point_array, copy_ext->point_num);
/*Refresh the style with new signal function*/
lv_obj_refresh_style(new_line);
......@@ -105,18 +103,13 @@ void lv_line_set_points(lv_obj_t * line, const lv_point_t * point_a, uint16_t po
ext->point_array = point_a;
ext->point_num = point_num;
uint8_t us = 1;
if(ext->upscale != 0) {
us = 1 << LV_ANTIALIAS;
}
if(point_num > 0 && ext->auto_size != 0) {
uint16_t i;
lv_coord_t xmax = LV_COORD_MIN;
lv_coord_t ymax = LV_COORD_MIN;
for(i = 0; i < point_num; i++) {
xmax = LV_MATH_MAX(point_a[i].x * us, xmax);
ymax = LV_MATH_MAX(point_a[i].y * us, ymax);
xmax = LV_MATH_MAX(point_a[i].x, xmax);
ymax = LV_MATH_MAX(point_a[i].y, ymax);
}
lv_style_t * lines = lv_obj_get_style(line);
......@@ -156,21 +149,6 @@ void lv_line_set_y_invert(lv_obj_t * line, bool yinv_en)
lv_obj_invalidate(line);
}
/**
* Enable (or disable) the points' coordinate upscaling (if LV_ANTIALIAS is enabled).
* @param line pointer to a line object
* @param unscale true: enable the point coordinate upscaling
*/
void lv_line_set_upscale(lv_obj_t * line, bool unscale_en)
{
lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
ext->upscale = unscale_en == false ? 0 : 1;
/*Refresh to point to handle upscale*/
lv_line_set_points(line, ext->point_array, ext->point_num);
}
/*=====================
* Getter functions
*====================*/
......@@ -199,18 +177,6 @@ bool lv_line_get_y_inv(lv_obj_t * line)
return ext->y_inv == 0 ? false : true;
}
/**
* Get the point upscale enable attribute
* @param obj pointer to a line object
* @return true: point coordinate upscale is enabled, false: disabled
*/
bool lv_line_get_upscale(lv_obj_t * line)
{
lv_line_ext_t * ext = lv_obj_get_ext_attr(line);
return ext->upscale == 0 ? false : true;
}
/**********************
* STATIC FUNCTIONS
**********************/
......@@ -243,23 +209,19 @@ static bool lv_line_design(lv_obj_t * line, const lv_area_t * mask, lv_design_mo
lv_point_t p2;
lv_coord_t h = lv_obj_get_height(line);
uint16_t i;
uint8_t us = 1;
if(ext->upscale != 0) {
us = 1 << LV_ANTIALIAS;
}
/*Read all pints and draw the lines*/
for (i = 0; i < ext->point_num - 1; i++) {
p1.x = ext->point_array[i].x * us + x_ofs;
p2.x = ext->point_array[i + 1].x * us + x_ofs;
p1.x = ext->point_array[i].x + x_ofs;
p2.x = ext->point_array[i + 1].x + x_ofs;
if(ext->y_inv == 0) {
p1.y = ext->point_array[i].y * us + y_ofs;
p2.y = ext->point_array[i + 1].y * us + y_ofs;
p1.y = ext->point_array[i].y + y_ofs;
p2.y = ext->point_array[i + 1].y + y_ofs;
} else {
p1.y = h - ext->point_array[i].y * us + y_ofs;
p2.y = h - ext->point_array[i + 1].y * us + y_ofs;
p1.y = h - ext->point_array[i].y + y_ofs;
p2.y = h - ext->point_array[i + 1].y + y_ofs;
}
lv_draw_line(&p1, &p2, mask, style);
}
......
......@@ -34,7 +34,6 @@ typedef struct
uint16_t point_num; /*Number of points in 'point_array' */
uint8_t auto_size :1; /*1: set obj. width to x max and obj. height to y max */
uint8_t y_inv :1; /*1: y == 0 will be on the bottom*/
uint8_t upscale :1; /*1: upscale coordinates with LV_DOWNSCALE*/
}lv_line_ext_t;
/**********************
......@@ -80,13 +79,6 @@ void lv_line_set_auto_size(lv_obj_t * line, bool autosize_en);
void lv_line_set_y_invert(lv_obj_t * line, bool yinv_en);
/**
* Enable (or disable) the points' coordinate upscaling (if LV_ANTIALIAS is enabled).
* @param line pointer to a line object
* @param unscale_en true: enable the point coordinate upscaling
*/
void lv_line_set_upscale(lv_obj_t * line, bool unscale_en);
/**
* Set the style of a line
* @param line pointer to a line object
* @param style pointer to a style
......@@ -115,13 +107,6 @@ bool lv_line_get_auto_size(lv_obj_t * line);
bool lv_line_get_y_inv(lv_obj_t * line);
/**
* Get the point upscale enable attribute
* @param obj pointer to a line object
* @return true: point coordinate upscale is enabled, false: disabled
*/
bool lv_line_get_upscale(lv_obj_t * line);
/**
* Get the style of an line object
* @param line pointer to an line object
* @return pointer to the line's style
......
......@@ -20,7 +20,7 @@
*********************/
#define LV_LIST_LAYOUT_DEF LV_LAYOUT_COL_M
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
# ifndef LV_LIST_FOCUS_TIME
# define LV_LIST_FOCUS_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */
# endif
......@@ -379,7 +379,7 @@ void lv_list_up(lv_obj_t * list)
if(ext->anim_time == 0) {
lv_obj_set_y(scrl, new_y);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = scrl;
a.start = lv_obj_get_y(scrl);
......@@ -422,7 +422,7 @@ void lv_list_down(lv_obj_t * list)
if(ext->anim_time == 0) {
lv_obj_set_y(scrl, new_y);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = scrl;
a.start = lv_obj_get_y(scrl);
......
......@@ -242,10 +242,10 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig
memcpy(&style_tmp, style, sizeof(lv_style_t));
#if LV_OBJ_GROUP
#if USE_LV_GROUP
lv_group_t *g = lv_obj_get_group(lmeter);
if(lv_group_get_focused(g) == lmeter) {
style_tmp.line.width += 1 << LV_ANTIALIAS;
style_tmp.line.width += 1;
}
#endif
......
......@@ -20,7 +20,7 @@
* DEFINES
*********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
# ifndef LV_MBOX_CLOSE_ANIM_TIME
# define LV_MBOX_CLOSE_ANIM_TIME 200 /*List close animation time) */
# endif
......@@ -200,7 +200,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay)
{
lv_mbox_ext_t * ext = lv_obj_get_ext_attr(mbox);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
if(ext->anim_time != 0) {
/*Add shrinking animations*/
lv_obj_animate(mbox, LV_ANIM_GROW_H| LV_ANIM_OUT, ext->anim_time, delay, NULL);
......@@ -222,7 +222,7 @@ void lv_mbox_start_auto_close(lv_obj_t * mbox, uint16_t delay)
*/
void lv_mbox_stop_auto_close(lv_obj_t * mbox)
{
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_del(mbox, NULL);
#endif
}
......
......@@ -313,7 +313,7 @@ void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
lv_obj_set_y(ext->scrl, scrlable_y);
}
else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.act_time = 0;
a.start = lv_obj_get_y(ext->scrl);
......@@ -412,7 +412,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo
if(mode == LV_DESIGN_COVER_CHK) {
return ancestor_design(scrl, mask, mode);
} else if(mode == LV_DESIGN_DRAW_MAIN) {
#if LV_OBJ_GROUP
#if USE_LV_GROUP
/* If the page is the active in a group and
* the background (page) is not visible (transparent or empty)
* then activate the style of the scrollable*/
......@@ -430,7 +430,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo
#endif
ancestor_design(scrl, mask, mode);
#if LV_OBJ_GROUP
#if USE_LV_GROUP
scrl->style_p = style_ori; /*Revert the style*/
#endif
} else if(mode == LV_DESIGN_DRAW_POST) {
......
......@@ -429,7 +429,7 @@ static void refr_position(lv_obj_t *roller, bool anim_en)
if(ext->ddlist.anim_time == 0 || anim_en == false) {
lv_obj_set_y(roller_scrl, new_y);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = roller_scrl;
a.start = lv_obj_get_y(roller_scrl);
......
......@@ -18,7 +18,7 @@
/*********************
* DEFINES
*********************/
#define LV_SLIDER_SIZE_MIN (4 << LV_ANTIALIAS) /*hpad and vpad cannot make the bar or indicator smaller then this [px]*/
#define LV_SLIDER_SIZE_MIN 4 /*hor. pad and ver. pad cannot make the bar or indicator smaller then this [px]*/
#define LV_SLIDER_NOT_PRESSED INT16_MIN
/**********************
......
......@@ -139,7 +139,7 @@ lv_obj_t * lv_ta_create(lv_obj_t * par, lv_obj_t * copy)
lv_obj_refresh_style(new_ta);
}
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Create a cursor blinker animation*/
lv_anim_t a;
a.var = new_ta;
......@@ -186,7 +186,7 @@ void lv_ta_add_char(lv_obj_t * ta, char c)
lv_mem_assert(ext->pwd_tmp);
lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, letter_buf);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Auto hide characters*/
lv_anim_t a;
a.var = ta;
......@@ -229,7 +229,7 @@ void lv_ta_add_text(lv_obj_t * ta, const char * txt)
lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Auto hide characters*/
lv_anim_t a;
a.var = ta;
......@@ -315,7 +315,7 @@ void lv_ta_set_text(lv_obj_t * ta, const char * txt)
ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(txt) + 1);
strcpy(ext->pwd_tmp, txt);
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Auto hide characters*/
lv_anim_t a;
a.var = ta;
......@@ -388,7 +388,7 @@ void lv_ta_set_cursor_pos(lv_obj_t * ta, int16_t pos)
ext->cursor.valid_x = cur_pos.x;
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
/*Reset cursor blink animation*/
lv_anim_t a;
a.var = ta;
......@@ -774,13 +774,13 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_
cur_style.body.grad_color = clv_color_tmp;
cur_style.body.border.color = clv_color_tmp;
cur_style.body.border.opa = LV_OPA_COVER;
cur_style.body.border.width = 1 << LV_ANTIALIAS;
cur_style.body.border.width = 1;
cur_style.body.shadow.width = 0;
cur_style.body.radius = 0;
cur_style.body.empty = 0;
cur_style.body.padding.hor = 0;
cur_style.body.padding.ver = 0;
cur_style.line.width = 1 << LV_ANTIALIAS;
cur_style.line.width = 1;
cur_style.body.opa = LV_OPA_COVER;
}
......@@ -859,7 +859,7 @@ static bool lv_ta_scrollable_design(lv_obj_t * scrl, const lv_area_t * mask, lv_
cur_area.y2 = letter_pos.y + ta_ext->label->coords.y1 + cur_style.body.padding.ver+ letter_h;
cur_style.body.empty = 1;
if(cur_style.body.border.width == 0) cur_style.body.border.width = 1 << LV_ANTIALIAS; /*Be sure the border will be drawn*/
if(cur_style.body.border.width == 0) cur_style.body.border.width = 1; /*Be sure the border will be drawn*/
lv_draw_rect(&cur_area, mask, &cur_style);
} else if(ta_ext->cursor.type == LV_CURSOR_UNDERLINE) {
cur_area.x1 = letter_pos.x + ta_ext->label->coords.x1 + cur_style.body.padding.hor;
......
......@@ -17,7 +17,7 @@
/*********************
* DEFINES
*********************/
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
# ifndef LV_TABVIEW_ANIM_TIME
# define LV_TABVIEW_ANIM_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */
# endif
......@@ -249,7 +249,7 @@ void lv_tabview_set_current_tab(lv_obj_t * tabview, uint16_t id, bool anim_en)
if(ext->anim_time == 0 || anim_en == false) {
lv_obj_set_x(ext->content, cont_x);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = ext->content;
a.start = lv_obj_get_x(ext->content);
......@@ -275,7 +275,7 @@ void lv_tabview_set_current_tab(lv_obj_t * tabview, uint16_t id, bool anim_en)
if(ext->anim_time == 0 || anim_en == false ) {
lv_obj_set_x(ext->indic, indic_x);
} else {
#if LV_NO_ANIM == 0
#if USE_LV_ANIMATION
lv_anim_t a;
a.var = ext->indic;
a.start = lv_obj_get_x(ext->indic);
......
......@@ -492,7 +492,7 @@ static void lv_win_realign(lv_obj_t * win)
lv_obj_align(ext->title, NULL, LV_ALIGN_IN_LEFT_MID, ext->style_header->body.padding.hor, 0);
lv_obj_set_pos_scale(ext->header, 0, 0);
lv_obj_set_pos(ext->header, 0, 0);
lv_obj_set_size( ext->page, lv_obj_get_width(win), lv_obj_get_height(win) - lv_obj_get_height(ext->header));
lv_obj_align( ext->page, ext->header, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 0);
......
......@@ -82,7 +82,7 @@ static void basic_init(void)
def.body.padding.ver = LV_DPI / 8;
def.body.padding.inner = LV_DPI / 8;
def.body.border.color = LV_COLOR_SILVER;
def.body.border.width = 1 << LV_ANTIALIAS;
def.body.border.width = 1;
def.body.border.opa = LV_OPA_COVER;
def.body.shadow.color = LV_COLOR_SILVER;
def.body.shadow.width = 0;
......@@ -90,20 +90,20 @@ static void basic_init(void)
def.text.color = LV_COLOR_HEX3(0xDDD);
def.text.font = _font;
def.text.letter_space = 1 << LV_ANTIALIAS;
def.text.line_space = 2 << LV_ANTIALIAS;
def.text.letter_space = 1;
def.text.line_space = 2;
def.image.color = LV_COLOR_HEX3(0xDDD);
def.image.intense = LV_OPA_TRANSP;
def.line.color = LV_COLOR_HEX3(0xDDD);
def.line.width = 1 << LV_ANTIALIAS;
def.line.width = 1;
/*Background*/
lv_style_copy(&bg, &def);
bg.body.main_color = LV_COLOR_HEX3(0x333);
bg.body.grad_color = LV_COLOR_HEX3(0x333);
bg.body.border.width = 2 << LV_ANTIALIAS;
bg.body.border.width = 2;
bg.body.border.color = LV_COLOR_HEX3(0x666);
bg.body.shadow.color = LV_COLOR_SILVER;
......@@ -113,7 +113,7 @@ static void basic_init(void)
panel.body.main_color = LV_COLOR_HEX3(0x666);
panel.body.grad_color = LV_COLOR_HEX3(0x666);
panel.body.border.color = LV_COLOR_HEX3(0xccc);
panel.body.border.width = 2 << LV_ANTIALIAS;
panel.body.border.width = 2;
panel.body.border.opa = LV_OPA_60;
panel.text.color = lv_color_hsv_to_rgb(_hue, 8, 96);
panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 70);
......@@ -124,11 +124,11 @@ static void basic_init(void)
sb.body.radius = LV_RADIUS_CIRCLE;
sb.body.border.color = LV_COLOR_SILVER;
sb.body.border.opa = LV_OPA_40;
sb.body.border.width = 1 << LV_ANTIALIAS;
sb.body.border.width = 1;
sb.body.main_color = lv_color_hsv_to_rgb(_hue, 33, 92);
sb.body.grad_color = lv_color_hsv_to_rgb(_hue, 33, 92);
sb.body.padding.hor = 1 << LV_ANTIALIAS;
sb.body.padding.ver = 1 << LV_ANTIALIAS;
sb.body.padding.hor = 1;
sb.body.padding.ver = 1;
sb.body.padding.inner = LV_DPI / 15; /*Scrollbar width*/
theme.bg = &bg;
......@@ -143,7 +143,7 @@ static void btn_init(void)
btn_rel.glass = 0;
btn_rel.body.empty = 1;
btn_rel.body.radius = LV_RADIUS_CIRCLE;
btn_rel.body.border.width = 2 << LV_ANTIALIAS;
btn_rel.body.border.width = 2;
btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 70, 90);
btn_rel.body.border.opa = LV_OPA_80;
btn_rel.body.padding.hor = LV_DPI / 4;
......@@ -226,7 +226,7 @@ static void bar_init(void)
bar_bg.body.radius = LV_RADIUS_CIRCLE;
bar_bg.body.main_color = LV_COLOR_WHITE;
bar_bg.body.grad_color = LV_COLOR_SILVER;
bar_bg.body.border.width = 2 << LV_ANTIALIAS;
bar_bg.body.border.width = 2;
bar_bg.body.border.color = LV_COLOR_SILVER;
bar_bg.body.border.opa = LV_OPA_20;
bar_bg.body.padding.hor = 0;
......@@ -235,7 +235,7 @@ static void bar_init(void)
lv_style_copy(&bar_indic, &def);
bar_indic.body.radius = LV_RADIUS_CIRCLE;
bar_indic.body.border.width = 2 << LV_ANTIALIAS;
bar_indic.body.border.width = 2;
bar_indic.body.border.color = LV_COLOR_SILVER;
bar_indic.body.border.opa = LV_OPA_70;
bar_indic.body.padding.hor = 0;
......@@ -272,7 +272,7 @@ static void line_init(void)
static lv_style_t line_decor;
lv_style_copy(&line_decor, &def);
line_decor.line.color = lv_color_hsv_to_rgb(_hue, 50, 50);
line_decor.line.width = 1 << LV_ANTIALIAS;
line_decor.line.width = 1;
theme.line.decor = &line_decor;
#endif
......@@ -304,7 +304,7 @@ static void slider_init(void)
slider_knob.body.radius = LV_RADIUS_CIRCLE;
slider_knob.body.main_color = LV_COLOR_WHITE;
slider_knob.body.grad_color = LV_COLOR_SILVER;
slider_knob.body.border.width = 1 << LV_ANTIALIAS;
slider_knob.body.border.width = 1;
slider_knob.body.border.color = LV_COLOR_GRAY;
slider_knob.body.border.opa = LV_OPA_50;
......@@ -320,11 +320,11 @@ static void sw_init(void)
static lv_style_t sw_bg, sw_indic, sw_knob;
lv_style_copy(&sw_bg, &bar_bg);
sw_bg.body.opa = LV_OPA_COVER;
sw_bg.body.padding.ver = -2 << LV_ANTIALIAS;
sw_bg.body.padding.hor = -2 << LV_ANTIALIAS;
sw_bg.body.padding.ver = -2 ;
sw_bg.body.padding.hor = -2 ;
sw_bg.body.main_color = LV_COLOR_HEX3(0x666);
sw_bg.body.grad_color = LV_COLOR_HEX3(0x999);
sw_bg.body.border.width = 2 << LV_ANTIALIAS;
sw_bg.body.border.width = 2;
sw_bg.body.border.opa = LV_OPA_50;
lv_style_copy(&sw_indic, &bar_indic);
......@@ -351,7 +351,7 @@ static void lmeter_init(void)
lmeter_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 80);
lmeter_bg.body.padding.hor = LV_DPI / 8; /*Scale line length*/
lmeter_bg.line.color = LV_COLOR_HEX3(0x222);
lmeter_bg.line.width = 2 << LV_ANTIALIAS;
lmeter_bg.line.width = 2;
theme.lmeter = &lmeter_bg;
......@@ -370,7 +370,7 @@ static void gauge_init(void)
gauge_bg.body.padding.inner = LV_DPI / 8; /*Label - scale distance*/
gauge_bg.body.border.color = LV_COLOR_HEX3(0x777);
gauge_bg.line.color = LV_COLOR_HEX3(0x555);
gauge_bg.line.width = 2 << LV_ANTIALIAS;
gauge_bg.line.width = 2;
gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
gauge_bg.text.font = _font;
......@@ -391,7 +391,7 @@ static void cb_init(void)
static lv_style_t cb_bg, cb_rel, cb_pr, cb_trel, cb_tpr, cb_ina;
lv_style_copy(&cb_rel, &bg);
cb_rel.body.radius = LV_DPI / 20;
cb_rel.body.border.width = 1 << LV_ANTIALIAS;
cb_rel.body.border.width = 1;
cb_rel.body.border.color = LV_COLOR_GRAY;
cb_rel.body.main_color = LV_COLOR_WHITE;
cb_rel.body.grad_color = LV_COLOR_SILVER;
......@@ -409,7 +409,7 @@ static void cb_init(void)
cb_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 82);
lv_style_copy(&cb_trel, &cb_rel);
cb_trel.body.border.width = 4 << LV_ANTIALIAS;
cb_trel.body.border.width = 4;
cb_trel.body.border.color = LV_COLOR_WHITE;
cb_trel.body.border.opa = LV_OPA_60;
cb_trel.body.main_color = lv_color_hsv_to_rgb(_hue, 50, 82);
......@@ -422,7 +422,7 @@ static void cb_init(void)
cb_tpr.body.grad_color = lv_color_hsv_to_rgb(_hue, 50, 52);
lv_style_copy(&cb_ina, &cb_trel);
cb_ina.body.border.width = 1 << LV_ANTIALIAS;
cb_ina.body.border.width = 1;
cb_ina.body.border.color = LV_COLOR_GRAY;
cb_ina.body.main_color = LV_COLOR_SILVER;
cb_ina.body.grad_color = LV_COLOR_SILVER;
......@@ -441,7 +441,7 @@ static void btnm_init(void)
{
#if USE_LV_BTNM
lv_style_copy(&btnm_bg, &lv_style_transp_tight);
btnm_bg.body.border.width = 1 << LV_ANTIALIAS;
btnm_bg.body.border.width = 1;
btnm_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 60, 80);
btnm_bg.body.border.opa = LV_OPA_COVER;
btnm_bg.body.radius = LV_DPI / 8;
......@@ -461,7 +461,7 @@ static void btnm_init(void)
lv_style_copy(&btnm_trel, &btnm_rel);
btnm_trel.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 80);
btnm_trel.body.border.width = 3 << LV_ANTIALIAS;
btnm_trel.body.border.width = 3;
lv_style_copy(&btnm_ina, &btnm_rel);
btnm_ina.text.color = lv_color_hsv_to_rgb(_hue, 10, 60);
......@@ -527,7 +527,7 @@ static void list_init(void)
static lv_style_t list_bg, list_rel, list_pr, list_trel, list_tpr, list_ina;
lv_style_copy(&list_rel, &def);
list_rel.body.empty = 1;
list_rel.body.border.width = 1 << LV_ANTIALIAS;
list_rel.body.border.width = 1;
list_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 50, 85);
list_rel.body.border.opa = LV_OPA_COVER;
list_rel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
......@@ -612,7 +612,7 @@ static void tabview_init(void)
tab_rel.body.padding.hor = 0;
tab_rel.body.padding.ver = LV_DPI / 6;
tab_rel.body.padding.inner = 0;
tab_rel.body.border.width = 1 << LV_ANTIALIAS;
tab_rel.body.border.width = 1;
tab_rel.body.border.color = LV_COLOR_SILVER;
tab_rel.body.border.opa = LV_OPA_40;
tab_rel.text.color = LV_COLOR_HEX3(0xDDD);
......@@ -627,7 +627,7 @@ static void tabview_init(void)
tab_trel.body.padding.hor = 0;
tab_trel.body.padding.ver = LV_DPI / 6;
tab_trel.body.padding.inner = 0;
tab_trel.body.border.width = 1 << LV_ANTIALIAS;
tab_trel.body.border.width = 1;
tab_trel.body.border.color = LV_COLOR_SILVER;
tab_trel.body.border.opa = LV_OPA_40;
tab_trel.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
......@@ -639,7 +639,7 @@ static void tabview_init(void)
tab_tpr.body.padding.hor = 0;
tab_tpr.body.padding.ver = LV_DPI / 6;
tab_tpr.body.padding.inner = 0;
tab_tpr.body.border.width = 1 << LV_ANTIALIAS;
tab_tpr.body.border.width = 1;
tab_tpr.body.border.color = LV_COLOR_SILVER;
tab_tpr.body.border.opa = LV_OPA_40;
tab_tpr.text.color = lv_color_hsv_to_rgb(_hue, 10, 94);
......
......@@ -60,7 +60,7 @@ static void basic_init(void)
sb.body.padding.ver = sb.body.padding.ver / 2;
lv_style_copy(&plain_bordered, &lv_style_plain);
plain_bordered.body.border.width = 2 << LV_ANTIALIAS;
plain_bordered.body.border.width = 2;
plain_bordered.body.border.color= LV_COLOR_HEX3(0xbbb);
theme.bg = &lv_style_plain;
......@@ -160,8 +160,8 @@ static void sw_init(void)
{
#if USE_LV_SW != 0
lv_style_copy(&sw_bg, &lv_style_pretty);
sw_bg.body.padding.hor = 3 << LV_ANTIALIAS;
sw_bg.body.padding.ver = 3 << LV_ANTIALIAS;
sw_bg.body.padding.hor = 3;
sw_bg.body.padding.ver = 3;
theme.sw.bg = &sw_bg;
theme.sw.indic = &lv_style_pretty_color;
......@@ -177,7 +177,7 @@ static void lmeter_init(void)
lv_style_copy(&lmeter, &lv_style_pretty_color);
lmeter.line.color = LV_COLOR_HEX3(0xddd);
lmeter.line.width = 2 << LV_ANTIALIAS;
lmeter.line.width = 2;
lmeter.body.main_color = color_mix(lmeter.body.main_color , LV_COLOR_WHITE, LV_OPA_50);
lmeter.body.grad_color = color_mix(lmeter.body.grad_color , LV_COLOR_BLACK, LV_OPA_50);
......
......@@ -58,18 +58,18 @@ static void basic_init(void)
def.body.padding.ver = LV_DPI / 10;
def.body.padding.inner = LV_DPI / 10;
def.body.border.color = LV_COLOR_BLACK;
def.body.border.width = 1 << LV_AA;
def.body.border.width = 1;
def.body.border.opa = LV_OPA_COVER;
def.body.border.part = LV_BORDER_FULL;
def.text.font = _font;
def.text.color = LV_COLOR_BLACK;
def.text.letter_space = 1 << LV_AA;
def.text.line_space = 1 << LV_AA;
def.text.letter_space = 1;
def.text.line_space = 1;
def.line.color = LV_COLOR_BLACK;
def.line.opa = LV_OPA_COVER;
def.line.width = 1 << LV_AA;
def.line.width = 1;
def.image.color = LV_COLOR_BLACK;
def.image.intense = LV_OPA_TRANSP;
......
......@@ -75,12 +75,12 @@ static void basic_init(void)
panel.body.grad_color = lv_color_hsv_to_rgb(_hue, 11, 18);
panel.body.radius = LV_DPI / 20;
panel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 25);
panel.body.border.width = 1 << LV_AA;
panel.body.border.width = 1;
panel.body.border.opa = LV_OPA_COVER;
panel.body.padding.ver = LV_DPI / 10;
panel.body.padding.hor = LV_DPI / 10;
panel.line.color = lv_color_hsv_to_rgb(_hue, 20, 40);
panel.line.width = 1 << LV_AA;
panel.line.width = 1;
theme.bg = &bg;
theme.panel = &def;
}
......@@ -101,7 +101,7 @@ static void btn_init(void)
btn_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40);
btn_rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 20);
btn_rel.body.border.color = LV_COLOR_HEX3(0x111);
btn_rel.body.border.width = 1 << LV_AA;
btn_rel.body.border.width = 1;
btn_rel.body.border.opa = LV_OPA_70;
btn_rel.body.padding.hor = LV_DPI / 4;
btn_rel.body.padding.ver = LV_DPI / 8;
......@@ -209,7 +209,7 @@ static void bar_init(void)
bar_indic.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
bar_indic.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
bar_indic.body.border.color = lv_color_hsv_to_rgb(_hue, 20, 15);
bar_indic.body.border.width = 1 << LV_AA;
bar_indic.body.border.width = 1;
bar_indic.body.border.opa = LV_OPA_COVER;
bar_indic.body.radius = LV_RADIUS_CIRCLE;
bar_indic.body.padding.hor = 0;
......@@ -291,13 +291,13 @@ static void cb_init(void)
rel.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 95);
rel.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 95);
rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 50);
rel.body.border.width = 2 << LV_AA;;
rel.body.border.width = 2;;
lv_style_copy(&pr, &rel);
pr.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 80);
pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 80);
pr.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 20);
pr.body.border.width = 1 << LV_AA;;
pr.body.border.width = 1;;
lv_style_copy(&tgl_rel, &rel);
tgl_rel.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 90);
......@@ -308,7 +308,7 @@ static void cb_init(void)
tgl_pr.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
tgl_pr.body.grad_color = lv_color_hsv_to_rgb(_hue, 80, 70);
tgl_pr.body.border.color = lv_color_hsv_to_rgb(_hue, 80, 30);
tgl_pr.body.border.width = 1 << LV_AA;;
tgl_pr.body.border.width = 1;;
lv_style_copy(&ina, &rel);
......@@ -332,34 +332,34 @@ static void btnm_init(void)
static lv_style_t btnm_bg, rel, pr, tgl_rel, tgl_pr, ina;
lv_style_copy(&btnm_bg, &btn_rel);
btnm_bg.body.padding.hor = 2 << LV_AA;
btnm_bg.body.padding.ver = 2 << LV_AA;
btnm_bg.body.padding.hor = 2;
btnm_bg.body.padding.ver = 2;
btnm_bg.body.padding.inner = 0;
btnm_bg.body.border.width = 1<< LV_AA;//LV_BORDER_RIGHT;
lv_style_copy(&rel, &btn_rel);
rel.body.border.part = LV_BORDER_RIGHT;
rel.body.border.width = 2 << LV_AA;
rel.body.border.width = 2;
rel.body.radius = 0;
lv_style_copy(&pr, &btn_pr);
pr.body.border.part = LV_BORDER_RIGHT;
pr.body.border.width = 2 << LV_AA;
pr.body.border.width = 2;
pr.body.radius = 0;
lv_style_copy(&tgl_rel, &btn_tgl_rel);
tgl_rel.body.border.part = LV_BORDER_RIGHT;
tgl_rel.body.border.width = 2 << LV_AA;
tgl_rel.body.border.width = 2;
tgl_rel.body.radius = 0;
lv_style_copy(&tgl_pr, &btn_tgl_pr);
tgl_pr.body.border.part = LV_BORDER_RIGHT;
tgl_pr.body.border.width = 2 << LV_AA;
tgl_pr.body.border.width = 2;
tgl_pr.body.radius = 0;
lv_style_copy(&ina, &btn_ina);
ina.body.border.part = LV_BORDER_RIGHT;
ina.body.border.width = 2 << LV_AA;
ina.body.border.width = 2;
ina.body.radius = 0;
theme.btnm.bg = &btnm_bg;
......@@ -392,7 +392,7 @@ static void mbox_init(void)
mbox_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 30, 30);
mbox_bg.body.grad_color = lv_color_hsv_to_rgb(_hue, 30, 30);
mbox_bg.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 20);
mbox_bg.body.border.width = 1 << LV_AA;
mbox_bg.body.border.width = 1;
mbox_bg.body.shadow.width = LV_DPI / 10;
mbox_bg.body.shadow.color = LV_COLOR_HEX3(0x222);
mbox_bg.body.radius = LV_DPI / 20;
......@@ -412,7 +412,7 @@ static void page_init(void)
page_scrl.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 40);
page_scrl.body.grad_color = lv_color_hsv_to_rgb(_hue, 10, 40);
page_scrl.body.border.color = LV_COLOR_HEX3(0x333);
page_scrl.body.border.width = 1 << LV_AA;
page_scrl.body.border.width = 1;
page_scrl.body.radius = LV_DPI / 20;
......@@ -446,7 +446,7 @@ static void list_init(void)
list_btn_rel.body.empty = 1;
list_btn_rel.body.border.part = LV_BORDER_BOTTOM;
list_btn_rel.body.border.color = lv_color_hsv_to_rgb(_hue, 10, 5);
list_btn_rel.body.border.width = 1 << LV_AA;
list_btn_rel.body.border.width = 1;
list_btn_rel.body.radius = LV_DPI / 10;
list_btn_rel.text.color = lv_color_hsv_to_rgb(_hue, 5, 80);
list_btn_rel.body.padding.ver = LV_DPI / 6;
......@@ -539,7 +539,7 @@ static void win_init(void)
static lv_style_t win_bg;
lv_style_copy(&win_bg, &bg);
win_bg.body.border.color = LV_COLOR_HEX3(0x333);
win_bg.body.border.width = 1 << LV_AA;
win_bg.body.border.width = 1;
static lv_style_t win_header;
lv_style_copy(&win_header, &win_bg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment