lv_theme: integrate into the library

add lv_theme
This commit is contained in:
Gabor Kiss-Vamosi
2017-11-16 15:32:33 +01:00
parent e3378d23d4
commit b973dd342a
31 changed files with 1809 additions and 116 deletions

View File

@@ -10,6 +10,7 @@
#if USE_LV_LED != 0
#include "lv_led.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_draw/lv_draw.h"
/*********************
@@ -68,8 +69,15 @@ lv_obj_t * lv_led_create(lv_obj_t * par, lv_obj_t * copy)
/*Init the new led object*/
if(copy == NULL) {
lv_obj_set_style(new_led, &lv_style_pretty_color);
lv_obj_set_size(new_led, LV_LED_WIDTH_DEF, LV_LED_HEIGHT_DEF);
/*Set the default styles*/
lv_theme_t *th = lv_theme_get_current();
if(th) {
lv_led_set_style(new_led, th->led);
} else {
lv_led_set_style(new_led, &lv_style_pretty_color);
}
}
/*Copy an existing object*/
else {