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

388 Commits

Author SHA1 Message Date
Gabor Kiss-Vamosi
58f3f5625c fix(label) fix in lv_label_get_letter_pos with when pos==line_start
related to #2712
2021-10-26 15:08:49 +02:00
Gabor Kiss-Vamosi
e95efc152f fix(label) do not bidi process text in lv_label_ins_text
related to #2712
2021-10-26 14:21:34 +02:00
Gabor Kiss-Vamosi
2e08f80361 feat(calendar): add the header directly into the calendar widget
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"
2021-10-25 18:39:18 +02:00
Xiang Xiao
dd5199f279
Improve LV_FORMAT_ATTRIBUTE usage (#2673)
* fix(format): remove LV_FORMAT_ATTRIBUTE from the function body

since it's enough to append LV_FORMAT_ATTRIBUTE to function declaration

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

* fix(format): add LV_FORMAT_ATTRIBUTE to lv_snprintf and lv_log

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

* fix(format): fix the format specifier warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-25 12:18:45 +02:00
Gabor Kiss-Vamosi
b3b3ffc2b3 feat(canvas) add lv_canvas_set_px_opa
fixes #2665
2021-10-19 13:44:40 +02:00
Gabor Kiss-Vamosi
dfa4f5cff5 feat(arc) add support to LV_OBJ_FLAG_ADV_HITTEST 2021-10-19 12:52:35 +02:00
Gabor Kiss-Vamosi
2efa6dce78 fix(label) fix clipped italic letters
fixes: #2559
2021-10-18 15:41:41 +02:00
Gabor Kiss-Vamosi
273a0eb32f fix(textarea) various cursor darwing fixes 2021-10-12 16:36:52 +02:00
Carlos Diaz
acf915b896
test(arc) add initial unit tests (#2617)
* test(arc): Add test for valid creation

* test(arc): Add test for max value truncation

* test(arc): Add test for min value truncation

* test(arc): Add test for value adjustment after updating range

* test(arc): Update test for min value truncation

* test(arc): Add test for angle updating after changing to symmetrical mode

* test(arc): Add test for angle updating after changing to symmetrical mode and value is greater than middle range

* test(arc): Use unity setUp function

* remove API comments from lv_arc.c

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-10-07 19:01:02 +02:00
Gabor Kiss-Vamosi
c9d396571d fix(textarea) allow using cursor with not full bg_opa
fixes #2620
2021-09-30 17:44:47 +02:00
Gabor Kiss-Vamosi
86012aefc7 fix(btnmatrix) always udpate row_cnt
allocate_btn_areas_and_controls() returned very early if the same number buttuns were set
the the number fo rows can be different and is wasn't updated

fixes #2619
2021-09-29 13:51:30 +02:00
Gabor Kiss-Vamosi
6f90f9cefb fix(table) remove unnecessary invalidation on pressing 2021-09-29 12:06:32 +02:00
Johannes Marbach
d57eb7614d
feat(btnmatrix/keyboard): add option to show popovers on button press (#2537)
This adds a new option that, when enabled, shows popovers when pressing
buttons, similar to how the system keyboards on Android and iOS behave.
2021-09-28 11:28:59 +02:00
Gabor Kiss-Vamosi
f2987b6591 fix(table) consider border width for cell positions
fixes #2612
2021-09-28 09:20:09 +02:00
guoweilkd
ea980668f4
fix(label):LONG_DOT mode crash if text Utf-8 encode > 1 (#2591) 2021-09-27 16:26:10 +02:00
guoweilkd
a3952fcd0a
fix(label):make draw area contain ext_draw_size (#2587) 2021-09-23 16:54:57 +02: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
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
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
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
d67dd943ca format run code-formtter.sh
related to #2543
2021-09-13 14:06:26 +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
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
Gabor Kiss-Vamosi
df3b96900b fix(arc) fix LV_ARC_MODE_REVERSE
fixes #2522
2021-09-09 14:46:43 +02:00
Gabor Kiss-Vamosi
5ced08001c fix(arc) fix arc invalidation again
realted to #2490
2021-09-09 11:24:31 +02:00
Kevin Thibedeau
ec9b41a05f
fix(zoom) multiplication overflow on 16-bit platforms (#2536) 2021-09-06 21:40:38 -04: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
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
ckielstra
5249a34d5d
docs more spelling fixes (#2499) 2021-08-27 12:15:39 +02:00
Gabor Kiss-Vamosi
98b9ce5997 fix(arc) fix full arc invalidation
fixes #2490
2021-08-25 13:09:07 +02:00
Gabor Kiss-Vamosi
a39dac9e5c fix(checkbox) consider the bg border when positioning the indicator 2021-08-17 18:52:06 +02:00
embeddedt
8ae894ebd4
feat(switch) add smooth animation when changing state (#2442)
* feat(switch) add smooth animation when changing state

* refactor(switch) improve code quality for animation feature

* refactor(switch) flatten animation structure into widget

Co-authored-by: HX2003 <HX2003@users.noreply.github.com>
2021-08-17 12:33:55 +02:00
Gabor Kiss-Vamosi
ea2545ae5d fix(table) fix an off-by-one issue in self size calculation 2021-08-17 10:47:27 +02:00
Gabor Kiss-Vamosi
e41c507804 fix(dropdown) adjust the handling of keys sent to the dropdown 2021-08-12 14:44:03 +02:00
Gabor Kiss-Vamosi
8a50edd068 fix(dropdown) handle LV_KEY_ENTER
fixes https://forum.lvgl.io/t/how-to-send-key-events-to-a-dropdown/6393
2021-08-11 10:49:05 +02:00
Gabor Kiss-Vamosi
0f14f49465 fix(arc, merter) fix invaidation in special cases
fixes #2443
2021-08-09 15:37:58 +02:00
Gabor Kiss-Vamosi
a1b362c986 fix(canvas) invalidate the image on delete
fixes #2398
2021-08-09 11:23:48 +02:00
Gabor Kiss-Vamosi
7672847ce3 fix(bidi) fix the handling of LV_BASE_DIR_AUTO in several widgets
fixes #2421
2021-08-03 16:03:07 +02:00
Gabor Kiss-Vamosi
5b3d3dc8b3 perf(draw) reimplement rectangle drawing algorithms
No functionalty has changed only make them more readable and faster.
2021-08-02 15:45:14 +02:00
Gabor Kiss-Vamosi
79edb37b0a fix(dropdown) fix list position with RTL base direction
related to #2424
2021-08-02 12:27:57 +02:00
Gabor Kiss-Vamosi
4dd1d566fc fix(dropdown) use LV_EVENT_READY/CANCEL on list open/close
Instead of LV_EVENT_VALUE_CHANGE to avoid conflicts with new option selection.
2021-07-28 10:09:46 +02:00
Gabor Kiss-Vamosi
dae7039803 fix(dropdown) send LV_EVENT_VALUE_CHANGED to allow styling of the list 2021-07-28 09:52:37 +02:00
Gabor Kiss-Vamosi
8c15933030 fix(table) clip overflowing content
If there was a extra draw padding the cells were draw out of the real table
2021-07-28 09:38:45 +02:00
Gabor Kiss-Vamosi
637b706ddc
perf(draw) reimplement circle drawing algorithms (#2374)
* 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
2021-07-27 19:16:00 +02:00
Neo
c98c8252ea
feat(snapshot) add API to take snapshot for object (#2353)
* 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>
2021-07-19 14:46:28 +02:00
Neo
fe461caf7e
feat(img) add img_size property (#2284)
* Fix image zooming causes unexpected object size.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>

* fix(img) invalidate size and layout on zoom and angle change

* fix(img) not self-repeating under some zoom level.

* minor fixes and refactoring

* docs(img) add img_size

Co-authored-by: Xu Xingliang <xuxingliang@xiaomi.com>
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2021-07-16 21:05:49 +02:00
Avamander
078eaa009d
refactor(printf) add printf-like function attribute to _lv_txt_set_text_vfmt and lv_label_set_text_fmt (#2332)
This improves static analysis and compiler warnings of incorrect format usage.
2021-07-11 15:19:51 -04:00