add lv_components as src/extra and minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-04 14:46:11 +01:00
parent 5c5327f31a
commit 8a1af8646f
260 changed files with 14082 additions and 3728 deletions

View File

@@ -0,0 +1,11 @@
C
^
Simple spinner
""""""""""""""""""""""""""""
.. lv_example:: lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1
:language: c
MicroPython
^^^^^^^^^^^

View File

@@ -0,0 +1,12 @@
#include "../../../lvgl.h"
#if LV_USE_SPINNER
void lv_ex_spinner_1(void)
{
/*Create a Preloader object*/
lv_obj_t * spinner = lv_spinner_create(lv_scr_act(), 500, 60);
lv_obj_set_size(spinner, 100, 100);
lv_obj_align(spinner, NULL, LV_ALIGN_CENTER, 0, 0);
}
#endif

View File

@@ -0,0 +1,15 @@
# Create a style for the Preloader
style = lv.style_t()
lv.style_copy(style, lv.style_plain)
style.line.width = 10 # 10 px thick arc
style.line.color = lv.color_hex3(0x258) # Blueish arc color
style.body.border.color = lv.color_hex3(0xBBB) # Gray background color
style.body.border.width = 10
style.body.padding.left = 0
# Create a Preloader object
preload = lv.preload(lv.scr_act())
preload.set_size(100, 100)
preload.align(None, lv.ALIGN.CENTER, 0, 0)
preload.set_style(lv.preload.STYLE.MAIN, style)