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>
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>
* 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.
* 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