Compare commits

...

2 Commits

Author SHA1 Message Date
Gabor Kiss-Vamosi
fc98bf7f3c chore: kick CI to rebuild the docs 2024-04-23 15:57:22 +02:00
Jason Peterson
e19410f8f8 fix(demo): added gaurd to prevent crash if default theme is not used (#3257) 2022-04-11 12:44:53 +02:00
2 changed files with 2 additions and 4 deletions

View File

@@ -16,10 +16,8 @@ LVGL provides everything you need to create an embedded GUI with easy-to-use gra
<a href="https://docs.lvgl.io/master/examples.html">Interactive examples</a>
</h4>
**English** | [中文](./README_zh.md) |
---
#### Table of content

View File

@@ -1064,9 +1064,9 @@ static void color_event_cb(lv_event_t * e)
lv_palette_t * palette_primary = lv_event_get_user_data(e);
lv_palette_t palette_secondary = (*palette_primary) + 3; /*Use another palette as secondary*/
if(palette_secondary >= _LV_PALETTE_LAST) palette_secondary = 0;
#if LV_USE_THEME_DEFAULT
lv_theme_default_init(NULL, lv_palette_main(*palette_primary), lv_palette_main(palette_secondary), LV_THEME_DEFAULT_DARK, font_normal);
#endif
lv_color_t color = lv_palette_main(*palette_primary);
lv_style_set_text_color(&style_icon, color);
lv_chart_set_series_color(chart1, ser1, color);