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

7297 Commits

Author SHA1 Message Date
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
Carlos Diaz
40364453b0
fix add missing LV_ASSERT_OBJ checks (#2575)
* feat(led): Add missing LV_ASSERT_OBJ checks

* feat(calendar): Add missing LV_ASSERT_OBJ checks

* feat(chart): Add missing LV_ASSERT_OBJ checks

* feat(colorwheel): Add missing LV_ASSERT_OBJ checks

* feat(animimg): Add missing LV_ASSERT_OBJ checks

* feat(keyboard): Add missing LV_ASSERT_OBJ checks

* feat(meter): Add missing LV_ASSERT_OBJ checks

* feat(msgbox): Add missing LV_ASSERT_OBJ checks

* feat(span): Add missing LV_ASSERT_OBJ checks

* feat(spinbox): Add missing LV_ASSERT_OBJ checks

* feat(tabview): Add missing LV_ASSERT_OBJ checks
2021-09-23 19:53:16 +02:00
Xiang Xiao
13b89a8434
fix(lv_conf_internal_gen.py) formatting fixes on the generated file (#2542)
* fix(lv_conf_internal_gen.py): change lv_conf.h to lv_conf_internal.h

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

* fix(lv_conf_internal_gen.py): remove the extra space before macro

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

* fix: regenerate lv_conf_internal.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-23 19:52:31 +02:00
guoweilkd
458d0353cf
fix(span) opa bug (#2584) 2021-09-23 18:55:02 +02:00
Neo
5f75a3b406
fix(snapshot) snapshot is affected by parent's style because of wrong coords (#2579)
* fix(snapshot) image is affected by parent's style because of wrong coordinates

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>

* fix(snapshot): take ext_draw_size into account and set disp res to obj size.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
Change-Id: Iae0d37fa1b2cdf20220087ced51857a36e83bb6d
2021-09-23 18:28:28 +02:00
guoweilkd
a3952fcd0a
fix(label):make draw area contain ext_draw_size (#2587) 2021-09-23 16:54:57 +02:00
fvanroie
6c868a4b35
docs(group) remove reference to lv_cont which is gone in v8 (#2580)
As reported on the forum: https://forum.lvgl.io/t/documantation-mislead/6876
2021-09-23 08:12:27 -04:00
Johannes Marbach
51f3310592
fix(btnmatrix): make ORed values work correctly with lv_btnmatrix_has_btn_ctrl (#2571)
This commit replaces the current `actual & expected` check in
`lv_btnmatrix_has_btn_ctrl` with `(actual & expected) == expected`. This
is required to make the function work with ORed control flags because
otherwise a parity in *any* bit will result in a return value of `true`
even if not all expected bits are set.
2021-09-22 12:03:19 +02:00
Gabor Kiss-Vamosi
47734c4abe fix(log) be sure LV_LOG_... is not empty if logs are disabled
Fixes https://github.com/lvgl/lvgl/issues/2408#issuecomment-919645206
2021-09-20 21:03:24 +02:00
Mariotaku
258a9ae03b
feat(msgbox) add a content area for custom content (#2561)
* added lv_dialog

* fixed include path

* formatted code

* make dialog backdrop themeable

* added missing backdrop init

* moved features in lv_dialog to lv_msgbox

* simplified msgbox style
2021-09-20 20:49:36 +02:00
Carlos Diaz
bb6829796b
test(checkbox) add initial tests (#2551)
* test(checkbox): Add initial test for checkbox

* test(checkbox): Add test_checkbox_should_have_default_text_when_created

* test(checkbox): Add test_checkbox_should_return_dinamically_allocated_text

* test(checkbox): Add initial tests for static text

Tests are failing tho

* test(arc): Rename bugfix test to arc

Also adds reference to issue in a comment

* test(checkbox): Tests for static text passes

* test(checkbox): Remove test for memory freeing when static text is refreshed

NULL isn't a valid parameter in lv_checkbox_set_text_static
2021-09-20 20:38:47 +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
Carlos Diaz
ab50f001a6
feat(tests): Include debug information to test builds (#2568) 2021-09-19 15:23:21 -04:00
Gabor Kiss-Vamosi
3e0ddd0285 docs(checkbox) update the comment lv_checkbox_set_text_static
NULL shouldn't be passed as text
Related to #2551
2021-09-18 20:04:04 +02:00
Gabor Kiss-Vamosi
3df2a74447 fix(btnmatrix) do not show pressed, focused or focus key states on disabled buttons 2021-09-17 22:25:09 +02:00
Gabor Kiss-Vamosi
fba37a30ab fix(chart) draw line chart indicator (bullet)
There was a missing bullet if the previous point was LV_CHART_POINT_NONE
2021-09-17 22:25:09 +02:00
Mariotaku
efc5bb40d9
feat(drawing) hardware accelerated rendering by SDL2 (#2484)
* Hardware accelerated SDL render WIP

* Rect drawing code cleanup

* Fixed arc drawing angle
Fixed compact rect drawing

* Refactoring
Fixed cache deinit order

* Image recolor
Drawing left and right border

* Math problems

* Improving draw cache

* Improving line drawing logic

* Improving arc drawing quality

* Added round function

* Attempts to render properly on Pi

* Updated lruc function names

* Updated symbol names

* Saved ram by reusing part of background rect

* Added outline drawing
Removed arc texture caching

* rect drawing cache rendering

* high efficiency rect shadow texture caching

* fixed simple borders drawing

* fixed generic borders drawing

* Simplified text atlas caching logic
Supports chroma keyed image

* Color palette WIP

* Improved draw cache

* Updated defines for better build

* renaming files for better consistency

* fix includes

* Updated lv_conf_internal with generator

* Fixing build issues

* fixed img rotation pivot

* better font atlas caching WIP

* fix includes

* full font atlas support
improved gpu caching for rect

* update conf header

* fix palette creation

* Fixed font atlas key matching

* fixed chroma key image background

* added 3bpp mask palette (WIP)

* fixed caching key initialization

* disabled gpu arc drawing for now
updated naming convention

* updated naming convention

* fix makefile and include path

* improved rect drawing when having masks

* improved rect drawing when having masks

* reduced texture allocation while drawing with mask

* accurate clipping for rects and texts

* fixed build error

* fixed build error

* line drawing WIP

* updated imports

* fixed freezes if LRU has smaller new item

* fixed clipping rect color

* fixed build error

* using built-in free function for LRU key

* Added custom background drawing function

* fixing imports

* fixed shadow bitmap on old SDL libs

* improved draw_img compatibility

* fixing font baking

* fixed font rendering

* fixed lv_draw_line check

* configurable SDL include path

* disabled SDL line drawing implementation

* supports screen resize

* sdl: Remove duplicated object

Observed issue:

  /usr/bin/ld: lv_gpu_sdl_texture_cache.o: \
  in function `_lv_gpu_sdl_texture_cache_init':
  lv_gpu_sdl_texture_cache.c:(.text+0x30): \
  multiple definition of `_lv_gpu_sdl_texture_cache_init'; \
  lv_gpu_sdl_texture_cache.o:lv_gpu_sdl_texture_cache.c:(.text+0x30): \
  first defined here

Forwarded: https://github.com/mariotaku/lvgl/pull/1
Relate-to: https://github.com/lvgl/lvgl/pull/2484
Signed-off-by: Philippe Coval <philippe.coval@huawei.com>

* Reduced opening of image

* Closes image resource properly

* improved draw image logic

* Moved driver related code to lv_drivers

* fixed lv_deinit implicit sdl code invocation

* improved shadow clipping

* fixed outline area invalidation

* updated comments

* formatted code using astyle

* Updated README

* formatted code

* fixed typo

* fixed static declaration

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: Philippe Coval <philippe.coval@huawei.com>
2021-09-16 18:20:32 +02:00
Liming Du
71e6f65d51
fix(lv_textarea) fix crash while delete non-ascii character in pwd mode (#2549) 2021-09-15 13:58:25 +02:00
Gabor Kiss-Vamosi
fb7ea10401 fix(anim) return the first anim if exec_cb is NULL in lv_anim_get()
Accprdign to the docs it should have worked like this.
Related to #2535
2021-09-15 13:40:42 +02:00
Gabor Kiss-Vamosi
192419e7bb fix(label) fix lv_label_get_letter_on with BIDI enabled 2021-09-14 15:08:11 +02:00
Gabor Kiss-Vamosi
56ebb1a4c8 feat(textarea) remove the need of lv_textarea_set_align
It was used to position the text in one line text areas where the label is shorter then the text area itself.
However, setting min_width=100% in case of one line text area ensures that the label is at least as wide as
the text area. This way the normal text_align style property can be used too.

Fixes https://forum.lvgl.io/t/spinbox-text-centering-not-working-as-intended-expected/6762/4
2021-09-13 20:09:54 +02:00
Gabor Kiss-Vamosi
26e15fa577 fix(imgbtn) add lv_imgbtn_set_state
The normal lv_obj_add/clear_state couldn't refresh the image button properly.
2021-09-13 17:44:12 +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
Gabor Kiss-Vamosi
f810265c0d fix(draw) shadow darwing with large shadow width 2021-09-13 15:02:29 +02:00
guoweilkd
1ca78a0461
fix(example_roller_3) mask free param bug (#2553) 2021-09-13 14:27:08 +02:00
Gabor Kiss-Vamosi
d67dd943ca format run code-formtter.sh
related to #2543
2021-09-13 14:06:26 +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
Gabor Kiss-Vamosi
33b5d4a4fe fix(fropdown) add missing invalifations 2021-09-13 11:24:40 +02:00
Gabor Kiss-Vamosi
bb39e9d6f9 fix(checkbox) add missing invalifations 2021-09-13 11:24:40 +02:00
embeddedt
f215174999
ci(docs) run apt-get update before installation 2021-09-12 08:11:37 -04:00
Miguel Magno
5de6fbf847
docs(style) use correct API name for local styles (#2550) 2021-09-12 08:09:50 -04:00
Gabor Kiss-Vamosi
37a5d0c85a fix(style) refresh ext. draw pad for padding and bg img 2021-09-10 14:28:57 +02:00
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