fix warnings

This commit is contained in:
Gabor Kiss-Vamosi
2019-01-03 15:50:55 +01:00
parent 5bbb83c68b
commit c20af89a11
4 changed files with 11 additions and 10 deletions

View File

@@ -353,8 +353,8 @@
#ifndef LV_OBJ_FREE_PTR #ifndef LV_OBJ_FREE_PTR
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ #define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
#endif #endif
#ifndef LV_OBJ_REAILGN #ifndef LV_OBJ_REALIGN
#define LV_OBJ_REAILGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ #define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
#endif #endif
/*================== /*==================

View File

@@ -206,7 +206,7 @@
*==================*/ *==================*/
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ #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_FREE_PTR 1 /*Enable the free pointer attribute*/
#define LV_OBJ_REAILGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/ #define LV_OBJ_REALIGN 0 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
/*================== /*==================
* LV OBJ X USAGE * LV OBJ X USAGE

View File

@@ -29,7 +29,6 @@
**********************/ **********************/
static lv_theme_t theme; static lv_theme_t theme;
static lv_style_t def; static lv_style_t def;
static lv_style_t bg, panel;
/*Static style definitions*/ /*Static style definitions*/
static lv_style_t sb; static lv_style_t sb;
@@ -48,6 +47,8 @@ static lv_font_t * _font;
static void basic_init(void) static void basic_init(void)
{ {
static lv_style_t bg, panel;
lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/ lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/
def.text.font = _font; def.text.font = _font;
def.body.radius = DEF_RADIUS; def.body.radius = DEF_RADIUS;
@@ -543,7 +544,7 @@ static void ta_init(void)
static void spinbox_init(void) static void spinbox_init(void)
{ {
#if USE_LV_SPINBOX #if USE_LV_SPINBOX
theme.spinbox.bg= &panel; theme.spinbox.bg= theme.panel;
theme.spinbox.cursor = theme.ta.cursor; theme.spinbox.cursor = theme.ta.cursor;
theme.spinbox.sb = theme.ta.sb; theme.spinbox.sb = theme.ta.sb;
#endif #endif
@@ -730,7 +731,7 @@ static void table_init(void)
{ {
#if USE_LV_TABLE != 0 #if USE_LV_TABLE != 0
static lv_style_t cell; static lv_style_t cell;
lv_style_copy(&cell, &panel); lv_style_copy(&cell, theme.panel);
cell.body.radius = 0; cell.body.radius = 0;
cell.body.border.width = 1; cell.body.border.width = 1;
cell.body.padding.hor = LV_DPI / 12; cell.body.padding.hor = LV_DPI / 12;

View File

@@ -29,8 +29,6 @@
static lv_theme_t theme; static lv_theme_t theme;
/*Static style definitions*/ /*Static style definitions*/
static lv_style_t def; static lv_style_t def;
static lv_style_t bg;
static lv_style_t panel;
static lv_style_t sb; static lv_style_t sb;
/*Saved input parameters*/ /*Saved input parameters*/
@@ -47,6 +45,8 @@ static lv_font_t * _font;
static void basic_init(void) static void basic_init(void)
{ {
static lv_style_t bg;
static lv_style_t panel;
lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/ lv_style_copy(&def, &lv_style_pretty); /*Initialize the default style*/
def.body.border.opa = LV_OPA_COVER; def.body.border.opa = LV_OPA_COVER;
@@ -563,7 +563,7 @@ static void ta_init(void)
static void spinbox_init(void) static void spinbox_init(void)
{ {
#if USE_LV_SPINBOX #if USE_LV_SPINBOX
theme.spinbox.bg= &panel; theme.spinbox.bg= theme.panel;
theme.spinbox.cursor = theme.ta.cursor; theme.spinbox.cursor = theme.ta.cursor;
theme.spinbox.sb = theme.ta.sb; theme.spinbox.sb = theme.ta.sb;
#endif #endif
@@ -704,7 +704,7 @@ static void table_init(void)
{ {
#if USE_LV_TABLE != 0 #if USE_LV_TABLE != 0
static lv_style_t cell; static lv_style_t cell;
lv_style_copy(&cell, &panel); lv_style_copy(&cell, theme.panel;);
cell.body.radius = 0; cell.body.radius = 0;
cell.body.border.width = 1; cell.body.border.width = 1;
cell.body.shadow.width = 0; cell.body.shadow.width = 0;