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

7314 Commits

Author SHA1 Message Date
Xiang Xiao
9fc0c3cf98
fix(lv_log.h): remove the duplicated semicolon from LV_LOG_xxx (#2544)
and fix the caller who forget to add semicolon at the line end

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-09 15:34:36 +02:00
Johannes Marbach
2cd5a90b7d
feat(msgbox): omit title label unless needed (#2539)
Prior to this commit, when the title string was empty and the close
button disabled, an extra empty line showed at the top of the message
box. This commit prevents adding the title label unless it has content
or is needed as a spacer for the close button.

As a positive side effect, this also prevents the default "text" from
displaying when NULL is passed as the title.

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-09-09 15:09:49 +02:00
Gabor Kiss-Vamosi
df3b96900b fix(arc) fix LV_ARC_MODE_REVERSE
fixes #2522
2021-09-09 14:46:43 +02:00
Johannes Marbach
52dac2b8e4
feat(msgbox): add function to get selected button index (#2538)
This adds a new function lv_msgbox_get_active_btn that works analogously
to lv_msgbox_get_active_btn_text but returns the button index instead of
its text.

The index is more convenient for comparison in localized applications as
it doesn't depend on the current language.
2021-09-09 14:40:37 +02:00
Gabor Kiss-Vamosi
32e8276db7 fix(obj) in lv_obj_move_to_index() do not send LV_EVENT_CHILD_CHANGED on all changed child
The events will see half-ready child list and might crash
fixes #2541
2021-09-09 12:42:22 +02:00
Gabor Kiss-Vamosi
5ced08001c fix(arc) fix arc invalidation again
realted to #2490
2021-09-09 11:24:31 +02:00
Gabor Kiss-Vamosi
eb6ae52643 fix(disp) be sure the pending scr load animation is finished in lv_scr_load_anim 2021-09-07 21:54:35 +02:00
Kevin Thibedeau
ec9b41a05f
fix(zoom) multiplication overflow on 16-bit platforms (#2536) 2021-09-06 21:40:38 -04:00
eudoxos
6cf49a4e31
fix(printf) use __has_include for more accurate limits information (#2532)
This makes LV_PRId32 more reliable and less prone to type mismatch.
2021-09-06 21:39:10 -04:00
Tomas Rezucha
d6ff681853
Espressif IDF component manager (#2521)
* Publish LVGL releases to Espressif's component service

* Provide idf_component.yml
2021-09-06 11:20:33 +02:00
guoweilkd
a6527b0005
fix(font) add assert in lv_font.c if the font is NULL (#2533) 2021-09-06 11:13:39 +02:00
Kevin Thibedeau
7d9fe20a0e
docs(all) Proofread, fix typos and add clarifications in confusing areas (#2528)
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-09-06 10:55:37 +02:00
eudoxos
715d580d8c
feat(make) add lvgl interface target for micropython (#2529)
* Add lvgl interface target for micropython

* Add indentation to CMakeLists.txt
2021-09-06 10:39:51 +02:00
Xiang Xiao
69e9554af6
fix(lv_types.h): remove c/c++ compiler version check (#2525)
since stdint.h is included in many place unconditionally

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-05 20:53:56 +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
Gabor Kiss-Vamosi
54338f6e57 fix(build) fix micropython build error 2021-09-03 15:33:07 +02:00
Gabor Kiss-Vamosi
4eddeb35ab feat(event) add lv_obj_remove_event_cb_with_user_data
fixes #2459
2021-09-03 15:27:25 +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
Xiang Xiao
d5b64e1b5d
fix(lv_utils.c): remove the unneeded header inclusion (#2526)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-03 14:51:29 +02:00
Xiang Xiao
c6e8ee5002
fix(Kconfig) fix the comment in LV_THEME_DEFAULT_DARK (#2524)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-03 14:50:42 +02:00
eudoxos
4e58f74163
fix(sprintf) add format string for rp2 port (#2512)
* fixes for rp2 port (only format strings: int/int32_t mismatch, %d -> %ld)

* use portable PRId32 printf format, #include <inttypes.h> via lv_printf.h

* define LV_PRId32 macro (for int)

* figure out good way to build inside Micropython (plus indentation)

* re-add examples (lost on the way)

* hopefully fix PRI32d

* Revert off CMakeLists.txt changes so that this is about printf only
2021-09-03 14:45:42 +02:00
Gabor Kiss-Vamosi
f3342269f2 fix(color) fox color premult precision with 16 bit color depth 2021-09-02 13:41:30 +02:00
Gabor Kiss-Vamosi
4250e3c627 fix(draw) fix shdow drawing with readius=0
fixes #2519
2021-09-02 13:40:22 +02:00
Avra Mitra
90e241ce2a
chore(btnmatrix) removed unnecessary semicolon (#2520)
Removed an unnecessary semicolon at line 97 ( `lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj;` )
2021-09-02 12:16:20 +02:00
Chris Mumford
b1bf7fd29a
test(ci) build and run tests in parallel. (#2515)
Create one GitHub workflow job for each build option build
or test execution. This allows each of the five builds to
be executed in parallel as well as making it easier to
navigate to the test output as it now resides in its own
job.

This change **does** change the command-line arguments to
the test execution script. This is required to allow the
build options name to be passed in.

New `tests/main.py` command-line help:

```
usage: main.py [-h] [--build-options BUILD_OPTIONS] [--clean]
               [--report]
               [{build,test} [{build,test} ...]]

Build and/or run LVGL tests.

positional arguments:
  {build,test}          build: compile build tests, test:
                        compile/run executable tests.

optional arguments:
  -h, --help            show this help message and exit
  --build-options BUILD_OPTIONS
                        the build option name to build or run.
                        When omitted all build configurations
                        are used.
  --clean               clean existing build artifacts before
                        operation.
  --report              generate code coverage report for
                        tests.

This program builds and optionally runs the LVGL test programs.
There are two types of LVGL tests: "build", and "test". The
build-only tests, as their name suggests, only verify that the
program successfully compiles and links (with various build
options). There are also a set of tests that execute to verify
correct LVGL library behavior.
```
2021-09-01 11:58:14 +02:00
incity
effd87eae0
Update README.md (#2516) 2021-09-01 11:47:09 +02:00
Ehsan Galavi
21f6a2ea03
docs(flex) update flex.md (#2517)
Description sentences "LV_FLEX_FLOW_ROW_WRAP_REVERSE"  and "LV_FLEX_FLOW_COLUMN_WRAP_REVERSE" are corrected.
2021-09-01 09:12:39 +02:00
guoweilkd
996b0080bf
fix(span) fix some bugs (overflow,decor,align) (#2518) 2021-09-01 09:07:12 +02:00
Kevin Thibedeau
4d74194e0d
fix(color) Bad cast in lv_color_mix() caused UB with 16bpp or less (#2509) 2021-08-30 16:46:41 +02:00
Hotakus
9ed265e890
fix(imgbtn) displayed incorrect when the coordinate is negative (#2501)
* refactor(img) the function name spelling error

* fix(imgbtn) imgbtn display incorrect when the coordinate is negative

* imgbtn is ok now

* fix the potential bug that maybe it can not run into the "for" loop correctly
2021-08-30 15:09:02 +02:00
Chris Mumford
df6cbfe866
ci(tests) run tests using ctest (#2503)
Simplifies `tests/main.py` as it no longer needs to invoke
tests individually or keep track of and report their pass/fail
status.

Also enables the ability to run tests in parallel, support timeouts,
and re-run flaky tests.

https://cmake.org/cmake/help/latest/manual/ctest.1.html
2021-08-30 08:45:33 -04:00
Avra Mitra
d53b873556
Corrected a function name in obj.md (#2511)
In the example of `lv_obj_align_to(obj_to_align, obj_referece, LV_ALIGN_..., x, y)`, the function name was written as `lv_obj_align()`.
2021-08-30 11:08:04 +02:00
Chris Mumford
b5f6411732
ci(tests) add dependency on GNU parallel (#2510)
lv_binding_micropython added a dependency on GNU parallel[1] to allow
the tests to be run in parallel.

[1] https://www.gnu.org/software/parallel/
2021-08-29 07:26:35 -04:00
Chris Mumford
c11569dc5c
ci(tests) use common script to install development prereqs (#2504)
Simplified workflow and documentation, by moving the
development package prerequisites into a new build script
`scripts/install-prerequisites.sh`.

Also, moved prerequisite installation into its own CI step and
removed explicit working directory change as it is no longer
needed (`main.py` does it).
2021-08-27 18:57:46 -04:00
embeddedt
da0c97a367
docs(grid) fix missing article 2021-08-27 11:09:43 -04:00
Chris Mumford
9c846ee493
test convert Makefile to CMake (#2495)
* Convert tests/Makefile to a cmake project file.

This change switches the building of LVGL tests to use cmake
which is more portable than make. Additionally, whenever
cmake can be used, instead of the Python script (`main.py`),
the former is preferred.

The interface to `main.py` is unchanged, and tests are built
and executated the same as before.

This closes https://github.com/lvgl/lvgl/issues/2474.

* Installing `gcovr` in GitHub workflow.

* Documented steps to install libpng-dev.

* Added missing stdout flush when running tests.

* Grammar tweak in README.

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-08-27 15:49:31 +02:00
embeddedt
5dbea7d725
docs(display) fix grammar in one spot 2021-08-27 08:35:38 -04:00
Gabor Kiss-Vamosi
bcd99e8e43 docs(indev, layer) update lv_obj_set_click() to lv_obj_add_flag() 2021-08-27 13:58:46 +02:00
Gabor Kiss-Vamosi
c514bddd9b fix(refr) set disp_drv->draw_buf->flushing_last correctly with sw rotation 2021-08-27 13:21:52 +02:00
ckielstra
5249a34d5d
docs more spelling fixes (#2499) 2021-08-27 12:15:39 +02:00
reinhard-qian
9f6d911b37
fix(event) be sure to move all elements in copy “lv_obj_remove_event_cb” (#2492)
* modified the event function

* modified the event function

Co-authored-by: Chao.Qian <qianchao@onmicro.ic>
2021-08-26 15:37:10 +02:00
embeddedt
0b7be778a2
ci(codecov) hide statuses on commits for now 2021-08-26 09:35:22 -04: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
Gabor Kiss-Vamosi
eb5eaa3940 fix(msgbox) directly store the pointer of all children
The previous guess-by-child-id method was proven to be fragile

fixes #2494
2021-08-26 13:26:28 +02:00
Gabor Kiss-Vamosi
fa9898941f fix(font) handle the last pixel of the glyphs in font loader correctly
fixes: #2489
2021-08-26 12:15:27 +02:00
Gabor Kiss-Vamosi
9fb98da8a2 test(dropdown) remove dummy test case
relaetd to https://github.com/lvgl/lvgl/issues/2337#issuecomment-905002568
2021-08-26 12:11:29 +02:00
ckielstra
0f4e6e26f9
Simple spelling fixes (#2496) 2021-08-26 10:52:39 +02:00
Gabor Kiss-Vamosi
20f1867596 fix(draw) fix border width of simple (radius=0, no masking) borders 2021-08-25 16:43:48 +02:00
Gabor Kiss-Vamosi
78725f23da fix(draw) use the filtered colors in lv_obj_init_draw_xxx_dsc() functions
fixed #2491
2021-08-25 16:12:55 +02:00
Chris Mumford
53986b4b0e
test Refactor unit test scripts. (#2473)
* Refactor unit test scripts.

Does the following:

1. Remove as many dependencies on the operating system shell as possible.
   For example, use of shutil.rmtree(...) instead of os.system('rm -r ...').
   This brings this script a bit closer to being able to run on Windows.
2. Switch from os.system() to subprocess.check_call().
   * This is a bit more secure as check_call() directly invokes the subprocess
     without evaluation the arguments on a command-line.
   * Removes the need to evaluate the return code as check_call() does this.
   * Can directly set environment variables (e.g. env=cmd_env) instead of
     including with subprocess invocation (e.g. BIN=test.bin).
3. Minor cleanup to main.py sys.argv parsing.
4. PEP8 formatting.

* Ignore FileNotFoundError for rmtree('report').

* Back to os.system for gcovr.

* Removed unused shutil import.
2021-08-25 15:37:59 +02:00