feat(bar): reverse drawing direction of lv_bar if min > max (#4654)
Signed-off-by: wangxuedong <wangxuedong@xiaomi.com>
This commit is contained in:
@@ -33,7 +33,9 @@ A new value can be set by
|
||||
``lv_bar_set_value(bar, new_value, LV_ANIM_ON/OFF)``. The value is
|
||||
interpreted in a range (minimum and maximum values) which can be
|
||||
modified with :cpp:expr:`lv_bar_set_range(bar, min, max)`. The default range is
|
||||
0..100.
|
||||
0..100, and the default drawing direction is from left to right in horizontal mode and
|
||||
bottom to top in vertical mode. If the minimum value is greater than the maximum value, like
|
||||
100..0, the drawing direction changes to the opposite direction.
|
||||
|
||||
The new value in :cpp:func:`lv_bar_set_value` can be set with or without an
|
||||
animation depending on the last parameter (``LV_ANIM_ON/OFF``).
|
||||
|
||||
@@ -35,6 +35,9 @@ To set an initial value use :cpp:expr:`lv_slider_set_value(slider, new_value, LV
|
||||
animation time is set by the styles' ``anim_time`` property.
|
||||
|
||||
To specify the range (min, max values), :cpp:expr:`lv_slider_set_range(slider, min , max)` can be used.
|
||||
The default range is 0..100, and the default drawing direction is from left to right in horizontal mode and
|
||||
bottom to top in vertical mode. If the minimum value is greater than the maximum value, like
|
||||
100..0, the drawing direction changes to the opposite direction.
|
||||
|
||||
Modes
|
||||
-----
|
||||
|
||||
Reference in New Issue
Block a user