* fix(misc): avoid ;; after LV_ASSERT_STYLE/LV_ASSERT_OBJ
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
* fix(style_api_gen.py): remove the unused docs_prop_cnt variable
and remove the trailing space
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
* fix(style_api_gen.py): ensure the generated code follow the coding style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
* fix(style_api_gen.py): ensure props has the same order of lv_style_prop_t
and correct the style flags
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
* fix(CMake) split CMakeLists.txt, add options, includes and dependencies
* fix(CMake) do not use 'project' keyword with ESP_PLATFORM
* fix(CMake) prefix includes with CMAKE_CURRENT_LIST_DIR
* Don't depend on CMAKE_CURRENT_SOURCE_DIR
* fix(CMake) rename baremetal.cmake to custom.cmake
* fix(CMake) add CMake documentation
* adding font type check
* using theme specified font
supports freetype drawing
* adding font type check
* using theme specified font
supports freetype drawing
* freetype fallback font support
* improved fallback font
* updated fallback font modifier
* docs(events) LV_EVENT_APPLY was removed (#2791)
* reverted to default font logic
* removed unused function
* improved font fallback
* font fallback for default lv_draw_letter as well
* added back masked drawing support
* fallback support for freetype uncached
* updated description
* fixed constructor initialization for ISO C
* reverted unneeded changes
* using loop instead of recursion to resolve glyph info
* simplified glyph dec resolving
* removed unused enum value
* improved lv_font_fmt_ft_dsc_t field naming
* supports pointer as freetype font source
* Updated docs for font fallback
Co-authored-by: Vincent Hamp <higaski@users.noreply.github.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Some platforms define uint32_t as "unsigned long" rather than "unsigned int".
The %d format specifier is mismatched and the C99 format macros are the only
portable way to handle these types.
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
In v8.0 the header was a detached object which made it difficult to move the header and the calendar
together. Besides there were no way to notifi the header of the calendar's shown date has changed.
BREAKING CHANGE: API of cleander headers, the appearence of the calendars
related to #2573"
* 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>
* Update lv_spinbox.c
* Added support for moving the Spinbox digit position from right-to-left when clicking the button on an encoder. The default behaviour is when clicking the encoder button, the digit is moved from left-to-right (MSB to LSB).
* Added a check to see if the spinbox digit-count is just one. In that case it is pointless to check the buttonclick
* See also the spinbox.h file
* Update lv_spinbox.c
* Forgot the implementation of the setter function
* forgot a ;
* Update lv_spinbox.h
Adding Spinbox support for moving the digitposition both from left-to-right and right-to-left when editing a spinbox and clicking the encoder button. The current behaviour is clicking the encoder button only moves the digitposition from right to left (from MSB to LSB)
* Update lv_spinbox.c
Added brief / comment to new function
* Update lv_spinbox.h
More clear Brief / Comment
* Update lv_spinbox.c
nested function replaced by lv_pow fiunction
* Update lv_spinbox.h
removed spaces
* Update lv_spinbox.h
Replaced type used for direction of digit step when clicking an encoder with existing LVGL lv_dir_t
* Update lv_spinbox.c
Replaced type used for direction of digit step when clicking an encoder with existing LVGL lv_dir_t
* Update spinbox.md
Added comment for the new function 'lv_spinbox_set_digit_step_direction'
* Update src/extra/widgets/spinbox/lv_spinbox.h
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
* Update src/extra/widgets/spinbox/lv_spinbox.h
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
* Update lv_spinbox.c
bug: old definition LV_SPINBOX_DIGIT_DIR_TO_RIGHT changed to LV_DIR_RIGHT
* Update lv_spinbox.h
Extra linefeed removed
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
This change introduces new fields on `lv_disp_drv_t` that allow to
specify the size of the full display and the offset of the display
subsection that is being rendered to. The values are used to transform
the drawing area before calling `flush_cb` so that only the desired part
of the full display is being rendered to.
Relates to: lvgl/lv_drivers#166
* feat(theme) add getter function for default theme
* fix(disp) set default theme also for non-default displays
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
* 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
* 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
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.
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
* 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>
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>
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.
* - 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)
* - 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
* docs(overview) fix draw_buf fieldname
Change display driver buffer field to the new v8 field name: draw_buf.
* docs(overview) fix lv_img_create parameters
lv_img_create only has 1 parameter in v8.
* docs(get-started) fix draw_buf fieldname
Display driver `buffer` field changed to the new v8 field name: `draw_buf`.
* 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
* 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>
Add lv_<widget>_draw_part_type_t to widgets to precisly describe the hooked drawings.
Also add class_p element to lv_obj_draw_part_dsc_t to show what widgets lv_<widget>_draw_part_type_t needs to be used.
Related to: https://forum.lvgl.io/t/how-to-add-minor-division-lines-to-a-chart/5366/
* Spinbox set cursor to specific position (funct.)
* changed exp10 to lv_pow(10
* Update lv_spinbox.c
resolved indentation
* Update spinbox.md
Added lv_spinbox_set_pos description
Co-authored-by: Sebastian Dyker <sebastian.dyker@walther-systemtechnik.com>
- Changed all text based instances of LVGL to uppercase (Only instances referring to LVGL the project, not instances referring to the ‘lvgl’ directory structure in the repository, or in URL links)
- Standardized bulleted/numbered list capitalization and punctuation
- Fixed several typos and spelling errors
- Changed minor grammatical errors and structure for clarity.