Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RichTextLabel text padding options do not affect highlighted text #79534

Closed
danny88881 opened this issue Jul 16, 2023 · 1 comment · Fixed by #79571
Closed

RichTextLabel text padding options do not affect highlighted text #79534

danny88881 opened this issue Jul 16, 2023 · 1 comment · Fixed by #79571

Comments

@danny88881
Copy link
Contributor

Godot version

v4.1.stable.official [9704596]

System information

Godot v4.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3598) - 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz (12 Threads)

Issue description

Based on #63590 and the documentation for text_highlight_h_padding and text_highlight_v_padding, changes to these values should affect the width and height of the color box created from highlighting text, but this is not the case as the size of the color box remains the same.

Note that these values do affect the size of the color box created by the [bgcolor] bbcode.

image
This image depicts a RichTextLabel with both text_highlight_h_padding and text_highlight_v_padding set to 10, a magenta bgcolor, and the text being highlighted.

Steps to reproduce

Add a RichTextLabel and enable text selection.
Change the values of text_highlight_h_padding or text_highlight_v_padding to something non-zero.
Run the project and highlight the text.

Minimal reproduction project

N/A

@danny88881 danny88881 changed the title RichTextLabel text padding options do affect highlighted text RichTextLabel text padding options do not affect highlighted text Jul 16, 2023
@Calinou
Copy link
Member

Calinou commented Jul 17, 2023

I think this is by design. Text selection is generally expected to always look the same, regardless of the RichTextLabel you're performing the selection in. This is for visual consistency within the project.

"Highlighting" in the documentation is referring to [fgcolor], which is actually probably better known as redacting (since it occludes text if opaque). Either way, I'd reword the class reference to mention the [bgcolor] and [fgcolor] tags by name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants