Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion tutorials/ui/bbcode_in_richtextlabel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ Image and table vertical alignment

When a vertical alignment value is provided with the ``[img]`` or ``[table]`` tag
the image/table will try to align itself against the surrounding text. Alignment is
performed using a vertical point of the image and a vertical point of the text.
performed using a vertical point of the image and a vertical point of the specified part of the text.
There are 3 possible points on the image (``top``, ``center``, and ``bottom``) and 4
possible points on the text and table (``top``, ``center``, ``baseline``, and ``bottom``),
which can be used in any combination.
Expand All @@ -821,6 +821,22 @@ To specify both points, use their full or short names as a value of the image/ta

.. image:: img/bbcode_in_richtextlabel_image_align.webp

To specify part of the text, add one of the following values:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To specify part of the text, add one of the following values:
To specify the part of the text, add one of the following values:


- ``p`` (``prev``) - align to the height of text span directly before the image/table.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``p`` (``prev``) - align to the height of text span directly before the image/table.
- ``p`` (``prev``) - align to the height of the text span directly before the image/table.

- ``n`` (``next``) - align to the height of text span directly after the image/table.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``n`` (``next``) - align to the height of text span directly after the image/table.
- ``n`` (``next``) - align to the height of the text span directly after the image/table.

- ``a`` (``adjacent``) - align to the maximum height text spans directly before and after the image/table (default for images).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit hard to parse, does it mean "the text span with the maximum height"? I.e. "tallest"?

- ``l`` (``line``) - align to the height of the line (default for tables).

.. code-block:: none

prev[img=center,center,prev]...[/img][font_size=50]text[img=center,center,prev]...[/img][/font_size][font_size=80]text[img=center,center,prev]...[/img][/font_size]text
next[img=center,center,next]...[/img][font_size=50]text[img=center,center,next]...[/img][/font_size][font_size=80]text[img=tcenter,center,next]...[/img][/font_size]text
adj[img=center,center,adjacent]...[/img][font_size=50]text[img=center,center,adjacent]...[/img][/font_size][font_size=80]text[img=center,center,adjacent]...[/img][/font_size]text
line[img=center,center,line]...[/img][font_size=50]text[img=center,center,line]...[/img][/font_size][font_size=80]text[img=center,center,line]...[/img][/font_size]text

.. image:: img/bbcode_in_richtextlabel_image_align_scope.webp

.. code-block:: none

text [table=3,center]...[/table] text # Center to center.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading