1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

256 Commits

Author SHA1 Message Date
Gabor Kiss-Vamosi
b3b3ffc2b3 feat(canvas) add lv_canvas_set_px_opa
fixes #2665
2021-10-19 13:44:40 +02:00
Xiang Xiao
608d06e47a
fix(fsdrv) minor fs issue (#2682)
* fix(fs): replace all tab to space and other minor style fix

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs): rename lv_fs_libs.h to lv_fsdrv.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/stdio): fix the wrong directory path in fs_dir_open

and remove the duplicated or platform specific code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/posix): implement in fs_dir_read

and fix the wrong directory path in fs_dir_open

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

* fix(extra/fs/posix): return file handle directly to avoid malloc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-18 13:00:47 +02:00
Gabor Kiss-Vamosi
8e7bba6ace docs libs fixes 2021-10-04 15:27:52 +02:00
Gabor Kiss-Vamosi
d908f31f8f test fix warning and docs build error 2021-10-04 14:55:27 +02:00
Gabor Kiss-Vamosi
18f61c5f77
arch add small 3rd party libs to lvgl (#2569)
* move png, sjpg, bmp, gif, fs_if to extra/libs

* reorganize the examples

* update lv_conf_internal.h

* fix warnings

* add freetype

* remove unused assets

* add the new libs to build tests

* update the docs
2021-10-04 14:34:11 +02:00
Karijn Wessing
e7ba9b93af
feat(example) add lv_example_chart_9.py (#2604)
* Create lv_example_chart_9.py

lv_example_chart_9.c was exactly what i needed, thanks for that one!
the only thing is, i needed it in MicroPython :-) 
Here it is

* Update lv_example_chart_9.py

removed duplicate (... = lv.CHAR_POINT.NONE) lines

* Update lv_example_chart_9.py

restored gap
2021-10-01 09:51:49 +02:00
Karijn Wessing
bae2e2d44c
feat(example) add lv_example_chart_8.py (#2611)
translated lv_example_chart_8.c to python variant
2021-09-28 08:31:46 +02:00
fvanroie
bc9c356347
docs(animimg) add to extra widgets index and fix example (#2610)
`lv_example_animimg_1` should not contain the `.c` extension, and add animation image to the index page for extra widgets.
2021-09-27 13:02:52 -04:00
fvanroie
f9d9aef122
docs(animimg) Add missing animation image page (#2609)
* docs(animimg) Add missing animation image page

Skeleton page for the new `animimg` object.
It needs more review and updating, but this can serve as a start.

* docs(examples) Add index.rst for animation image

Add index.rst for animation image to include the example in the documentation of the widget.

* Update animimg.md
2021-09-27 17:52:00 +02:00
Karijn Wessing
114ad09e21
fix( example) in lv_example_scroll_3.py float_btn should only be created once (#2602) 2021-09-27 11:08:15 +02:00
Karijn Wessing
c7a49841bf
fix(example) minor fixes in lv_example_chart_2.py (#2601)
a few small bugfixes, demo works in simulator now
2021-09-27 11:07:24 +02:00
Gabor Kiss-Vamosi
5565d5965a
feat(example) chart example to add gap between the old and new data (#2565)
* fix(chart) draw line chart indicator (bullet)

There was a missing bullet if the previous point was LV_CHART_POINT_NONE

* feat(example) add chart example with gap in circular mode

* add missing prototype
2021-09-27 11:01:31 +02:00
Gabor Kiss-Vamosi
28e9593e58 fix(example) revert text code from lv_example_checkbox_2 2021-09-24 13:07:40 +02:00
Gabor Kiss-Vamosi
5240fdda5c fix(scroll) fix scroll_area_into_view with objects larger than the parent 2021-09-24 12:59:05 +02:00
Gabor Kiss-Vamosi
d089b364e7 feat(example) add checkbox example for radio buttons
related to https://forum.lvgl.io/t/implement-radio-button-with-checkbox/6879/8
2021-09-24 12:02:13 +02:00
JojoS
a31f4b77bf
fix compiling of examples when cmake is used (#2572)
* use INCLUDE_SIMPLE in all c sources

* removed unnecessary ifdef LV_LVGL_H_INCLUDE_SIMPLE
2021-09-20 13:42:47 +02:00
Karijn Wessing
953d9fb003
feat(example) add lv example list 2 (#2545)
* added micropython sample for obj.move_to_index(index)

* formatting update

* added lv.group_remove_obj(btn) for command buttons

* updated CHANGELOG.md
2021-09-13 17:41:25 +02:00
guoweilkd
1ca78a0461
fix(example_roller_3) mask free param bug (#2553) 2021-09-13 14:27:08 +02:00
Thomas Hepworth
8abd060a8a
example(chart) add area chart example (#2507)
* feat add stacked area chart example

The example shows how to use a line chart and masking to create a stacked area chart.

* feat stacked area chart example

Updated index.rst to contain the stacked area chart example

* feat stacked area chart example

Coding style changes

* Update changelog

* feat(example) stacked area chart

Added axis ticks

* feat(example) stacked area chart

Responses to PR comments
- Changed to fixed point maths
- Renamed variables and filenames

* feat(example) stacked area chart

Made shift amount a variable.

* feat(example) stacked area chart

Fixed typo in changelog

Co-authored-by: Tom Hepworth <Tom_Hepworth@mentor.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-09-13 12:11:10 +02:00
Karijn Wessing
780e0efe2c
feat(obj) add lv_obj_move_to_index(obj, index), renamed lv_obj_get_child_id(obj) to lv_obj_get_index(obj) (#2514)
* - renamed lv_obj_get_id(obj) to lv_obj_get_index(obj).

- added lv_obj_move_to_index(obj, index).

* automatic review comment fixed

* removed unused variable

* review issue

* restored deprecated function in header, otherwise Build Micropython with LVGL submodule / build (pull_request)  failes

* moved deprecated lv_obj_get_child_id() back to lv_obj_tree.h, otherwise Micropython will not build

* inline function did not work

* made deprecated function 'static inline'

* and now also inline

* move static inline function to lv_api_map.h again

* removed lv_obj_move_up/down

* changed log to warning for deprecated function

* redefined lv_obj_move_foreground(obj) and lv_obj_move_background(obj) as inline functions now calling lv_obj_move_to_index(obj, index).

- lv_obj_swap(obj1, obj2) added. (#2461)
2021-09-05 20:47:55 +02:00
Johannes Marbach
53b65a7964
fix(examples) don't compile assets unless needed (#2523)
This wraps the code for the assets under examples/assets in
LV_BUILD_EXAMPLES so that it is not compiled when examples are
deactivated in lv_conf.h.
2021-09-03 15:01:01 +02:00
ckielstra
5249a34d5d
docs more spelling fixes (#2499) 2021-08-27 12:15:39 +02:00
刘帅
7d592edaa0
fix(example) scroll example sqort types (#2498)
line 32 of lv_example_scroll_6.c, if LV_USE_LARGE_COORD not configured,
x_sqr will overflow when r is greater than 256.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>

Co-authored-by: liushuai25 <liushuai25@xiaomi.com>
2021-08-26 13:57:15 +02:00
Karijn Wessing
e111ea2a62
added lv_obj_move_up() and lv_obj_move_down() (#2467)
* - small with unneeded lv_obj_invalidate()  fix in lv_obj_move_foreground() and lv_obj_move_background()

- added lv_obj_move_up() and lv_obj_move_down()
- used new functions in sample 2
- used lv_obj_swap() to shuffle (turn around) list

* solved build error

* added top and bottom buttons in sample
2021-08-24 14:30:38 +02:00
Hotakus
6a5c0b4a70
Fix buf name error for "lv_port_disp_template.c" and optimize the arduino example (#2475)
* fix(buf) correct the name error

* fix(format) make the indent become 4 space

* fix(print) use lv_version_xxx  to serial for debug

* fix(arduino) optimize the code

* fix(arduino) use lv_version_xxx to serial
2021-08-24 14:27:36 +02:00
Gabor Kiss-Vamosi
a9971471ba fix(group) keep the focused object in lv_group_swap_obj
fixes #2462
2021-08-19 21:12:09 +02:00
Carlos Diaz
4642dd30c2
docs(bar) fix typos in widget examples (#2463) 2021-08-18 11:26:09 -04:00
Gabor Kiss-Vamosi
bb6d6b7799 chore(example) minor improvements on lv_example_list_2 2021-08-18 14:28:02 +02:00
Karijn Wessing
9a1f7f2fcb
feat(obj) add lv_obj_swap() function (#2461)
* proposal for lv_obj_swap() function

* review issues applied

* review changes for comments
2021-08-18 11:32:10 +02:00
Gabor Kiss-Vamosi
89081c2d6e fix(eaxmple) fix lv_example_chart_2 2021-08-05 17:54:31 +02:00
Gabor Kiss-Vamosi
4f9a037b93 fix warning and remove test code from an example 2021-08-03 16:37:25 +02:00
Gabor Kiss-Vamosi
7672847ce3 fix(bidi) fix the handling of LV_BASE_DIR_AUTO in several widgets
fixes #2421
2021-08-03 16:03:07 +02:00
Amir Gonnen
4bdeb756da
fix(examples) join usage (#2425)
Use 'join' correctly on Python scripts
2021-08-02 11:56:44 +02:00
Amir Gonnen
4effc87a87
fix(examples) add missing lv.PART.INDICATOR (#2423) 2021-07-31 17:40:13 -04:00
Amir Gonnen
145440dbce
fix(examples) use lv.grid_fr for MicroPython (#2419)
Instead of re-implementing LV_GRID_FR, use lv.grid_fr

Also use lv.GRID_TEMPLATE.LAST instead of lv.COORD.MAX where needed
2021-07-31 09:07:07 -04:00
Uli Raich
06b3013de5
feat(examples) add MicroPython version of lv_example_anim_3 and allow loading roller font dynamically (#2412) 2021-07-28 08:51:41 -04:00
Amir Gonnen
559b6458c0
fix(examples) remove symlinks (#2406)
Remove symlinks from Python examples because the JS simulator doesn't follow them and sees the target filename instead
2021-07-27 19:13:30 -04:00
Gabor Kiss-Vamosi
637b706ddc
perf(draw) reimplement circle drawing algorithms (#2374)
* perf(draw) reimplement circle drawing algorithms

Imporve the speed of circle drawing
Add circle draw caching
Various other speed improvements

* docs describe how to use masks

* fix(draw) add missing GC root usage
2021-07-27 19:16:00 +02:00
guoweilkd
e23701e2c2
example(anim) add demo to use cubic-bezier (#2393)
* animation:add demo to use cubic-bezier

* fix minor fixes on layout and chart

Co-authored-by: guoweilkd <guowei15@xioami.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-07-27 19:14:44 +02:00
_VIFEXTech
202cf1c8cb
perf(anim_timeline) add lv_anim_timeline_stop() (#2411)
* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add lv_anim_timeline.c to lv_misc.mk

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* LV_ANIM_TIMELINE_END uses global variables to replace macros, lv_anim_timeline_set_progress() adds user_data, act_time uses int32_t type

* solve the problem of uninitialized variable and act_time comparison

* add LV_ANIM_TIMELINE_CUSTOM_EXEC option

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add LV_ANIM_TIMELINE_CUSTOM_EXEC in lv_conf_internal.h

* redesign lv_anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add missing LV_USE_USER_DATA

* remove set_progress, update doc

* update workflow files

* Remove lv_example_anim_timeline_2.c and LV_ANIM_TIMELINE_CUSTOM_EXEC, update lv_anim_timeline_1.c example

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix warning

* fix(anim_timeline) heap use after free

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix(docs) wrong spelling of words in pictures

* perf(anim_timeline) add lv_anim_timeline_stop()

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-07-27 14:30:36 +02:00
Gabor Kiss-Vamosi
71a10e4ecd fix(example) adjust the object sizes in lv_example_anim_timeline_1() 2021-07-23 13:40:42 +02:00
guoweilkd
7f9297879f
fix(grid.h) typos (#2395)
* fix(grid.h) typos

* grid:replace LV_COORD_MAX use LV_GRID_TEMPLATE_LAST

Co-authored-by: guowei15 <guowei15@xiaomi.com>
2021-07-23 11:52:09 +02:00
Gabor Kiss-Vamosi
9ce2c7702d
Update index.rst 2021-07-22 21:56:00 +02:00
Uli Raich
c6e97162d1
added example lv_example_anim_timeline_1.py (#2387) 2021-07-21 10:37:22 +02:00
Amir Gonnen
55ef1826fc
fix(snapshot) add missing import on MicroPython example (#2389) 2021-07-20 19:37:00 -04:00
Neo
c98c8252ea
feat(snapshot) add API to take snapshot for object (#2353)
* Fix image zooming causes unexpected object size.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>

* add lv_snapshot_take API.

* fix(img) invalidate size and layout on zoom and angle change

* fix(img) not self-repeating under some zoom level.

* fix(snapshot) fix to keep the original position

* Move various set_px_cb_xx functions to lv_hal_disp.c

* add snapshot API to store image to provided buffer

* minor fixes and refactoring

* Move snapshot source to extra/others/snapshot.

1. Update parameter buff to buf.
2. Add macro to disable lv_snapshot, enabled by default.

* docs(others) add the others folder with snapshot.md

* docs(snapshot) added doc and example for snapshot.

1. Update doc snapshot.md
2. Add example lv_example_snapshot_1 to folder examples/others/snapshot
3. Update lv_conf_template.h and lv_conf_internal.h
4. Remove lv_snapshot.c from lv_misc.mk
5. Add others to index.md

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>

* add micropython example for snapshot

Co-authored-by: Xu Xingliang <xuxingliang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-07-19 14:46:28 +02:00
_VIFEXTech
690b3546d6
feat(anim) add anim timeline (#2309)
* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add lv_anim_timeline.c to lv_misc.mk

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* LV_ANIM_TIMELINE_END uses global variables to replace macros, lv_anim_timeline_set_progress() adds user_data, act_time uses int32_t type

* solve the problem of uninitialized variable and act_time comparison

* add LV_ANIM_TIMELINE_CUSTOM_EXEC option

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add LV_ANIM_TIMELINE_CUSTOM_EXEC in lv_conf_internal.h

* redesign lv_anim_timeline

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* add missing LV_USE_USER_DATA

* remove set_progress, update doc

* update workflow files

* Remove lv_example_anim_timeline_2.c and LV_ANIM_TIMELINE_CUSTOM_EXEC, update lv_anim_timeline_1.c example

Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

* fix warning

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-07-19 13:58:58 +02:00
embeddedt
ad1f91ab32
refactor(examples) drop usys import from header.py
This should not be needed as there is no platform-specific code anymore.
2021-07-14 12:47:59 -04:00
embeddedt
d8a3d3d0d7
fix(template) update indev template for v8
A few APIs were missed in the last attempt.

Fixes #2363
2021-07-11 15:47:23 -04:00
embeddedt
ef41450ed8
refactor(examples) drop JS-specific code from header.py
This logic was moved into the JS simulator itself
2021-07-11 15:09:25 -04:00