docs(xml): fix Sphinx errors in XML-component docs (#7820)
This commit is contained in:
@@ -58,7 +58,7 @@ A practical example is setting the current tab of a tab view, which cannot be se
|
||||
This feature is not supported yet.
|
||||
|
||||
``<enumdef>``
|
||||
************
|
||||
*************
|
||||
|
||||
Can be used only for widgets.
|
||||
|
||||
@@ -153,7 +153,7 @@ In a view it can be used like this:
|
||||
|
||||
<!-- complex_widget.xml -->
|
||||
<view>
|
||||
<lv_label text="Title"
|
||||
<lv_label text="Title"/>
|
||||
<my_widget width="100px" y="40px">
|
||||
<my_widget-indicator name="indic1" color="0xff0000" max_value="120" value="30"/>
|
||||
</my_widget>
|
||||
|
||||
@@ -32,14 +32,18 @@ In ``<styles>`` and ``<view>``, fonts can be referenced by their name, e.g.,
|
||||
The tag name determines how the font is loaded. Currently, only ``tinyttf as_file="true"`` is supported.
|
||||
|
||||
- ``bin``:
|
||||
|
||||
- If ``as_file="true"``: Converts the font file to ``bin`` (see `lv_font_conv`)
|
||||
which will be loaded by ``lv_binfont_create()``.
|
||||
- If ``as_file="false"`` (default): On export, the font file will be converted to a C array LVGL font
|
||||
that can be used directly by LVGL.
|
||||
|
||||
- ``tinyttf``:
|
||||
|
||||
- If ``as_file="true"``: Can be loaded directly by ``lv_tiny_ttf_create_file()``.
|
||||
- If ``as_file="false"`` (default): The font file will be converted to a raw C array on export
|
||||
that will be loaded by ``lv_tiny_ttf_create_data()``.
|
||||
|
||||
- ``freetype``: The file can be loaded directly by ``lv_freetype_font_create()``.
|
||||
|
||||
For simplicity, if ``as_file="false"``, fonts will be loaded as files in the preview.
|
||||
@@ -65,7 +69,12 @@ Exported Code
|
||||
When C code is exported, global ``const lv_font_t * <font_name>`` variables are created, and in the
|
||||
initialization function of the component library (e.g., ``my_lib_init_gen()``), the actual font is assigned.
|
||||
|
||||
In :cpp:expr:`lv_style_set_text_font(&style1, <font_name>)`, the created font is referenced.
|
||||
.. Note: :cpp:expr: role cannot be used here because it doesn't know how to parse
|
||||
the ampersand and angle brackets. An alternate approach could be to make the
|
||||
arguments "style1_p, font_name", but leaving the ampersand there seems more
|
||||
appropriate due to that IS the normal way to pass a style as an argument.
|
||||
|
||||
In ``lv_style_set_text_font(&style1, <font_name>)``, the created font is referenced.
|
||||
|
||||
Constants
|
||||
---------
|
||||
|
||||
@@ -38,7 +38,7 @@ In both cases in the exported C code global ``const void * <image_name>`` variab
|
||||
initialization function of the component library (e.g. ``my_lib_init_gen()``) either the path or
|
||||
the pointer to the converted :cpp:expr:`lv_image_dsc_t` pointers are assigned to that variable.
|
||||
|
||||
In :cpp:expr:`lv_image_set_src(image, <image_name>)` is used
|
||||
In :cpp:expr:`lv_image_set_src(image, image_name)` is used
|
||||
instead of the path or :cpp:expr:`lv_image_dsc_t` pointer directly.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. _others:
|
||||
.. _xml_component:
|
||||
|
||||
====================
|
||||
XML - Declarative UI
|
||||
@@ -27,3 +27,5 @@ XML - Declarative UI
|
||||
subjects
|
||||
animations
|
||||
|
||||
translations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user