From 46471a19bf9d23b1d8610568ad4ef41c8012dc38 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 17 Mar 2025 19:55:40 +0100 Subject: [PATCH] Document `fgcolor` and `bgcolor` highlight padding in BBCode in RichTextLabel --- tutorials/ui/bbcode_in_richtextlabel.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index ebd21e69d..edab91606 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -389,12 +389,20 @@ Reference * - | **bgcolor** | Draws the color behind ``{text}``. This can be used to highlight text. Accepts same values as the ``color`` tag. + By default, there is a slight padding which is controlled by the + ``text_highlight_h_padding`` and ``text_highlight_v_padding`` theme items + in the RichTextLabel node. Set padding to ``0`` to avoid potential overlapping + issues when there are background colors on neighboring lines/columns. - ``[bgcolor={code/name}]{text}[/bgcolor]`` * - | **fgcolor** | Draws the color in front of ``{text}``. This can be used to "redact" text by using an opaque foreground color. Accepts same values as the ``color`` tag. + By default, there is a slight padding which is controlled by the + ``text_highlight_h_padding`` and ``text_highlight_v_padding`` theme items + in the RichTextLabel node. Set padding to ``0`` to avoid potential overlapping + issues when there are foreground colors on neighboring lines/columns. - ``[fgcolor={code/name}]{text}[/fgcolor]``