From e59d6b1b8c0b13ac2686368c6e9e6b9b74008504 Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Fri, 13 Jan 2023 15:17:26 +0100 Subject: [RichTextLabel] Match minimum size calculation of Label (optional via fit_content property) --- doc/classes/RichTextLabel.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index dd291a425d..39c6d7f48c 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -8,7 +8,7 @@ [b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods. [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code]. [b]Note:[/b] [code]push_*/pop[/code] functions won't affect BBCode. - [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content_height] property. + [b]Note:[/b] Unlike [Label], RichTextLabel doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content] property. $DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html @@ -473,9 +473,8 @@ If [code]true[/code], the selected text will be deselected when focus is lost. - - If [code]true[/code], the label's height will be automatically updated to fit its content. - [b]Note:[/b] This property is used as a workaround to fix issues with [RichTextLabel] in [Container]s, but it's unreliable in some cases and will be removed in future versions. + + If [code]true[/code], the label's minimum size will be automatically updated to fit its content, matching the behavior of [Label]. If [code]true[/code], the label underlines hint tags such as [code][hint=description]{text}[/hint][/code]. -- cgit v1.2.3