theme updates

This commit is contained in:
Gabor Kiss-Vamosi
2018-09-21 06:56:37 +02:00
parent a9df82a0af
commit d2dfabee3f
2 changed files with 33 additions and 1 deletions

View File

@@ -263,7 +263,9 @@
/*Button (dependencies: lv_cont*/ /*Button (dependencies: lv_cont*/
#define USE_LV_BTN 1 #define USE_LV_BTN 1
#if USE_LV_BTN != 0
#define LV_BTN_INK_EFFECT 1 /*1: enable ink effect animation on click. Use `lv_btn_set_ink_in/wait/out_time` to set the animation time*/
#endif
/*Image Button (dependencies: lv_btn*/ /*Image Button (dependencies: lv_btn*/
#define USE_LV_IMGBTN 1 #define USE_LV_IMGBTN 1

View File

@@ -278,6 +278,34 @@ static void gauge_init(void)
#endif #endif
} }
static void arc_init(void)
{
#if USE_LV_ARC != 0
static lv_style_t arc;
lv_style_copy(&arc, &def);
arc.line.width = 8;
arc.line.color = lv_color_hsv_to_rgb(_hue, 80, 70);
arc.line.rounded = 1;
/*For preloader*/
arc.body.border.width = 7;
arc.body.border.color = lv_color_hsv_to_rgb(_hue, 11, 48);
arc.body.padding.hor = 1;
arc.body.padding.ver = 1;
theme.arc = &arc;
#endif
}
static void preload_init(void)
{
#if USE_LV_PRELOAD != 0
theme.preload = theme.arc;
#endif
}
static void chart_init(void) static void chart_init(void)
{ {
#if USE_LV_CHART #if USE_LV_CHART
@@ -667,6 +695,8 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font)
sw_init(); sw_init();
lmeter_init(); lmeter_init();
gauge_init(); gauge_init();
arc_init();
preload_init();
chart_init(); chart_init();
calendar_init(); calendar_init();
cb_init(); cb_init();