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

7835 Commits

Author SHA1 Message Date
Viatorus
45b0f86ae5
feat(disp): add screen out animations (#3081)
* add screen out animations

* make FADE_ON an alias of FADE_IN for backward compatiblitiy

* revert any changes to lv_indev.c

* format code

* update docs

* disable input if screen animation is active
2022-03-10 16:54:42 +01:00
Gabor Kiss-Vamosi
5ec6694f78 fix(theme): fix mono theme init 2022-03-10 15:12:17 +01:00
HX2003
bc94b4de52
feat(menu): make menu widget more compatible with encoder (#3061) 2022-03-10 14:03:38 +01:00
Carlos Diaz
688421bc10
chore(tests_indev): Add comments to encoder helper (#3155) 2022-03-10 10:53:56 +01:00
Gabor Kiss-Vamosi
a6c4c13490
fix(menu): fix crash on delete (#3154)
* fix(menu): fix crash on delete

fixes #3123

* handle NULL

* code formatting
2022-03-09 00:05:53 +01:00
Gabriel Wang
08a3cc0eb6
chore(doc): fix typos in task-handler.md (#3153) 2022-03-08 20:29:40 +01:00
embeddedt
fcc1152f9c
ci don't run workflows twice on PRs 2022-03-07 10:04:59 -05:00
embeddedt
8ac93ad883
refactor(style) move flag information into a dedicated table (#3102) 2022-03-07 10:01:25 -05:00
embeddedt
d345f76d02
ci remove formatting comment
This only works when the author is an @lvgl member.
2022-03-05 17:11:39 -05:00
embeddedt
cbc38afb3a
fix(bmp) fix typo in BPP condition
Thanks @egonbeermat
2022-03-05 13:28:45 -05:00
Xiang Xiao
ff0bf6386d
chore(lvgl.[h|mk]): don't include the grandchildren file (#3145)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 21:00:13 +01:00
Jackson Ming Hu
04aca9dae3
fix(Kconfig): add missing LV_USE_THEME_MONO (#3146) 2022-03-04 20:55:05 +01:00
Xiang Xiao
4078a571dc
fix(demo/stress): remove the unused assets (#3139)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 19:38:32 +01:00
LY3T
5a3ca098f7
fix(jpg): swap high and low bytes when macro LV_COLOR_16_SWAP is 1 (#3138) 2022-03-01 18:57:48 +01:00
Gabriel Wang
c0575c57af
chore(env-support): cmsis-pack monthly update (#3137)
* Update README.md

* feat(env_support): cmsis-pack monthly update
2022-03-01 18:49:05 +01:00
Gabor Kiss-Vamosi
18f2d78728 fix(roller): fix unexpected jump in infinite mode
fixes #3132
2022-03-01 18:40:39 +01:00
Carlos Diaz
0a5c5465d2
chore(docs): fix trailing whitespaces in files (#3133) 2022-03-01 13:52:45 +01:00
Carlos Diaz
406386dc3f
test(line): add unit tests for line widget (#3104)
* test(line): Test y invert field

* test(line): Validate documented default values

* test(line): Assert line is not clickable after construction

* test(line): Test line size calculation

* chore(line): Refactor LV_EVENT_GET_SELF_SIZE handling

Return early when no point_array is set or point_num is 0

* chore(line): Cleanup LV_EVENT_DRAW_MAIN handling

Reduce scope of point variables

* test(line): Clean screen on tearDown

* test(line): Add initial test for extra draw size calculation

* test(line): Fix extra draw size test
2022-02-25 19:58:43 +01:00
Andres O. Vela
340d45cfa9
feat(label): added animation style property to apply it to circular scrolling animation of label widget (#3128)
* feat(label): added animation style property to apply it to circular scrolling animation of label widget

Added an animation style property to be used as animation template for different use cases in different widgets.
This commit implements using this property to set the start and repeat delay of the circular scrolling animation of the label widget.

Closes #3097

* fix(label): changed animation style property's var_type to `const lv_anim_t *`

* example(label): added example showing how to customize circular scrolling animation

* chore(label): ran code-format.py and added missing function prototype to lv_example_widgets.h
2022-02-25 11:54:27 +01:00
Carlos Diaz
e25fa427d1
test(table): replicate issue when reducing table cells (#3121)
* test(table): Replicate issue when reducing table cells

See #3120 for report

* test(table): Cell reduction test without use after free

Set the row count to 1 to be able to have a passing test, now we can track
down the real bug, which is triggered when having more than 1 row in the table.

* test(table): Add failing test for cell reduction

This test currently triggers the use after free bug

* chore(table): No-op when new and current row and columns counts are equal

* chore(table): Clean up lv_table_set_col_cnt

* chore(table): Add comments to get_row_height

* chore(table): Minor format cleanup and comment of cell_data layout

* fix ASAN arror

* minor fixes

* chore(table): Restore comments to get_row_height

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-24 19:14:33 +01:00
Carlos Diaz
a83cae012d
feat(script): add pre-commit configuration for code formatting (#3092)
* Add initial pre-commit configuration for code formatting

* chore: Move --recursive switch from cfg file to script

* pre-commit: Update format-source hook to use code-format.cfg

Also remove the code-format-per-file.cfg file as it's now unused

* docs: Add section about pre-commit
2022-02-24 18:44:39 +01:00
GoT
4ed0f011f6
chore(docs): fix type about file system cache_size setting (#3115) 2022-02-24 17:19:04 +01:00
Gabor Kiss-Vamosi
ac202e7b96 fix(keyboard): don't show popovers on map change 2022-02-23 18:41:49 +01:00
Gabor Kiss-Vamosi
72cb683c79 fix(group): in lv_group_remove() fix if the object to focus is deleted
If in the defocus event of the currently focused object the the next object to focus is deleted there was a  crash
2022-02-23 18:40:27 +01:00
Gabor Kiss-Vamosi
3d92972695 fix(spinbox): set its default width in its class 2022-02-22 20:55:37 +01:00
Gabor Kiss-Vamosi
bb03fb197c fix(theme): in the basic theme show the textarea cursor only in focuses state 2022-02-22 20:55:37 +01:00
Gabor Kiss-Vamosi
83343f11a1 chore(draw): show error for small gradient cache size 2022-02-22 20:55:37 +01:00
Alexandre Abadie
774403b3cf
fix(script): in lv_conf_internal fix some widget dependencies when using Kconfig (#3119)
* widgets: make dependencies internal handling consistent when using Kconfig

* scripts/lv_conf_internal_gen.py: fix issue with widget with dependencies

* scripts/lv_conf_internal_gen.py: allow to call it from other directory
2022-02-22 19:45:33 +01:00
Xiang Xiao
550a15c317
fix(demo): minor fix for benchmark (#3114)
1.add const to rnd_map
2.replace "i < sizeof(scenes) / sizeof(scene_dsc_t) - 1" with "scenes[i].create_cb"
3.replace "sizeof(scenes) / sizeof(scene_dsc_t)" with "dimof(scenes)"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-22 12:47:04 +01:00
_VIFEXTech
30648ab4f1
feat(refr): prevents dirty areas from being modified during rendering (#3107)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-22 11:59:02 +01:00
GoT
efb9c5cc52
chore(fs): wrong parameters doc for fs_write in lv_port_fs_template.c (#3109)
* Wrong parameters doc for fs_write

Wrong parameters doc for fs_write in lv_port_fs_template.c

* Fix wrong code block for fsdrv files and lv_fs.h
2022-02-21 16:14:06 +01:00
Xiang Xiao
0b799830ea
chore(demos): redirect urls to the new location in README.md (#3112)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-21 16:13:12 +01:00
xaowang96
15f9a54ba4
fix(misc): in lv_map() handle if maximum value less than minimum value (#3113) 2022-02-21 15:40:27 +01:00
Gabor Kiss-Vamosi
d034511bba feat(draw): add draw_ctx->buffer_copy
realted to: #3087
2022-02-18 13:57:11 +01:00
_VIFEXTech
48cb4e9164
fix(extra): adjust image decoder initialization order (#3085)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-18 12:56:14 +01:00
Ali Rostami
f23ae6e67c
fix(chart): optimize chart invalidation (#3028)
* replace lv_chart_refresh by invalidate_point so the chart will be updated faster.

* Update lv_chart.c

It seems the second `invalidate_point` is extra and can be removed.

* Update src/extra/widgets/chart/lv_chart.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-18 12:30:47 +01:00
_VIFEXTech
2be4e82991
fix(refr): fix performance monitor NULL pointer access (#3105)
* fix(refr) performance monitor NULL pointer access

* doc(refr): describe the setting of LV_DISP_DEF_REFR_PERIOD

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-02-18 11:32:16 +01:00
Jason Pritchard
c49430bfd4
fix(misc): Remove duplicate declaration of _lv_log_add. (#3103)
Commit ba38a4b appears to have accidentally added a duplicate declaration of
_lv_log_add. With -Wredundant-decls, this causes warnings to spam the terminal.

    warning: redundant redeclaration of ‘_lv_log_add’ [-Wredundant-decls]
2022-02-18 09:00:27 +01:00
Ken Carpenter
349a51cb03
fix(gridnav): get key code from the actual event (#3101)
This enables queuing up a key while animation is occurring and then sending it to the gridnav once the animation is complete.
Without this, if you call `lv_event_send()` to send a key to the gridnav later, then `lv_indev_get_act()` returns `NULL` since it's no longer actively processing the key handler, and nothing happens from the key.
2022-02-17 22:23:14 +01:00
Gabor Kiss-Vamosi
6c00552629 fix: fix warning 2022-02-17 18:34:26 +01:00
Gabor Kiss-Vamosi
b1e2c06658 fix(gif): fix rare issue when drawing the gif's background 2022-02-17 18:16:48 +01:00
Carlos Diaz
ab727d3181
test(textarea): add unit test (#3074)
* test(textarea): Password mode

* test(textarea): label style with one line enabled

* test(textarea): Cursor click pos

* chore(textarea): Move auto hide to helper

* test(textarea): Placeholder text

* test(textarea): Default properties values

* test(textarea): Remove assert from one line test

* tests(textarea): Remove unused variables

* feat/textarea: Add and use is_valid_but_non_printable_char

* chore/textarea: General cleanup

* test(textarea): Accepted chars

* Update src/widgets/lv_textarea.c

* test(textarea): Assert text is empty after widget creation

* test(textarea): Update test for label style with one line enabled

* test(textarea): Add default text helper and use it

* test(textarea): Ignore line break chars in one line mode

* textarea: Check for line break chars sooner when adding char

* textarea: Start refactor of insert_handler

* textarea: Add comments to insert_handler

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-17 18:12:59 +01:00
Gabor Kiss-Vamosi
b6d2daa493 feat(gridnav): add lv_gridnav_set_focused
fixes #3069
2022-02-17 18:11:30 +01:00
Carlos Diaz
cfd6d43672
test(table): add unit tests (#3040)
* test(table): Happy path test for set_cell_value

* table: Abstract char configuration on set_cell_value

Abstract bytes to allocate calculation and txt copying

* table: Add missing &

* table: Update helper names

* test(table): Add test for column increasing when setting a formatted cell value

* table: Increase table columns when needed

* test(table): Fix test_table_should_grow_columns_automatically_when_setting_formatted_cell_value

* table: Fix code formatting

* test(table): Add test for cell ctrl

* table: Refactor draw_main low hanging fruits

* lv_table: Initial refactor of get_row_height

Mostly early breaks on loops and reducing variable scope where possible

* lv_table: Initial refactor of refr_size

Adding const wherever is possible

* lv_table: Further cleanup get_row_height

* lv_table: Cleanup loop in draw_main

* lv_table: Fix -Werror=shadow compilation error

* test(table): Tests for cell ctrl clearance

* lv_table: Rename index to idx

* lv_table: Use helper to know if cell is empty

* test(table): Comment assumptions to column grow test

* test(table): Row height with multi line cell value

* test(table): Wrap on long texts and increase row height

* add rendering test

* fix warnings

* fix out of bounds indexig

* fix rendering test

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2022-02-17 13:52:46 +01:00
guoweilkd
060b37e8fb
fix(draw_rect): delete __STDC_VERSION__ to ensure C++ compatibility (#3099) 2022-02-17 12:31:16 +01:00
Gabor Kiss-Vamosi
fe4caaff0e chore: remove debug settings 2022-02-16 20:31:17 +01:00
Gabor Kiss-Vamosi
c742f2c888 fix(obj): fix LV_OBJ_FLAG_OVERFLOW_VISIBLE
fixes: #3098
2022-02-16 19:58:59 +01:00
Gabriel Wang
a82dc49c26
pre-release for LVGL cmsis-pack v1.0.1 (#3091)
* pre-release for LVGL cmsis-pack v1.0.1

* update lv_conf_cmsis.h
2022-02-16 19:39:16 +01:00
Gabor Kiss-Vamosi
4a766c516d example(slider): make lv_example_slider_3 work with dark theme too
fixes: #3094
2022-02-16 14:04:05 +01:00
GoT
0cbb0087f7
docs(scroll) add information about scroll coordinates (#3088) 2022-02-16 07:49:12 -05:00