diff --git a/docs/src/details/widgets/arc.rst b/docs/src/details/widgets/arc.rst index 8b0f794f31..326f4e9142 100644 --- a/docs/src/details/widgets/arc.rst +++ b/docs/src/details/widgets/arc.rst @@ -152,7 +152,7 @@ value directly. Note that this is a two-way binding (Subject <===> Widget), so user's direct interaction with the Arc Widget updates the Subject's value and vice versa. -It support integer and float subjects. +It supports integer subjects and, when ``LV_USE_FLOAT`` is enabled, float subjects. - :cpp:expr:`lv_arc_bind_value(arc, &subject)` diff --git a/docs/src/details/widgets/label.rst b/docs/src/details/widgets/label.rst index 77378ae6f0..ae627a12cd 100644 --- a/docs/src/details/widgets/label.rst +++ b/docs/src/details/widgets/label.rst @@ -212,6 +212,11 @@ the Subject's value is used to update the Label's text as follows: :integer Subject: Subject's integer value is used with the ``format_string`` argument. See :ref:`observer_format_string` for details. + +:float Subject: Subject's float value is used with the ``format_string`` argument. + Requires ``LV_USE_FLOAT``. + See :ref:`observer_format_string` for details. + Note that this is a one-way binding (Subject ===> Widget). - :cpp:expr:`lv_label_bind_text(label, &subject, format_string)` @@ -233,8 +238,8 @@ printf-like format specifier and be one of the following: cross-platform equivalent where ``xx`` can be ``8``, ``16``, ``32`` or ``64``, depending on the platform). -:float Subject: "%f" format specifier, or e.g. "%0.2f" to display two digits after the decimal point. - +:float Subject: "%f" format specifier, e.g. "%0.2f", to display two digits + after the decimal point. If ``NULL`` is passed for the ``format_string`` argument: @@ -242,9 +247,9 @@ If ``NULL`` is passed for the ``format_string`` argument: :integer Subject: The Label will simply display the number. Equivalent to "%d". :float Subject: The Label will display the value with "%0.1f" format string. -**Example:** "%d |deg|\C" +**Example:** "%d |deg|\ C" -As usual with format strings, ``%%`` shall be used to get ``%``. For example ``%d%%`` +As usual with format strings, ``%%`` is used to get ``%``. For example ``%d%%`` diff --git a/src/drivers/opengles/lv_opengles_texture.c b/src/drivers/opengles/lv_opengles_texture.c index e12bb0468d..7bd3c21deb 100644 --- a/src/drivers/opengles/lv_opengles_texture.c +++ b/src/drivers/opengles/lv_opengles_texture.c @@ -122,6 +122,7 @@ unsigned int lv_opengles_texture_get_texture_id(lv_display_t * disp) if(disp->flush_cb != flush_cb) { return 0; } + lv_opengles_texture_t * dsc = lv_display_get_driver_data(disp); return dsc->texture_id; }