Add option to scale images in RichTextLabel relative to font size#112617
Add option to scale images in RichTextLabel relative to font size#112617Meorge wants to merge 1 commit intogodotengine:masterfrom
Conversation
43c28e8 to
4f9ed1a
Compare
I'm curious if we should go with That said, maybe it's not a relevant distinction here. |
|
If I'm understanding and the theme/default font size for this RichTextLabel is 16px, then the I suppose we could include both |
9b68a8b to
18054ba
Compare
|
The This required changing the width and height values from ints to floats, so now for free the pixel sizes and percentages also support float values! |
a5707c6 to
b56beeb
Compare
c623eb0 to
a157217
Compare
a157217 to
2e4a0c7
Compare
Use base font size Added docs and compatibility methods Fix compatibility methods maybe for real this time???? Please? Make width/height use floats instead of ints, and then make 1em be the height of surrounding text Fix documentation for floats instead of ints Update compatibility # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected Add compatibility breakages file # Conflicts: # misc/extension_api_validation/4.5-stable_4.6-stable/godotengineGH-112617.txt
2e4a0c7 to
323b12e
Compare
Use base font size Added docs and compatibility methods Fix compatibility methods maybe for real this time???? Please? Make width/height use floats instead of ints, and then make 1em be the height of surrounding text Fix documentation for floats instead of ints Update compatibility # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected Add compatibility breakages file # Conflicts: # misc/extension_api_validation/4.5-stable_4.6-stable/godotengineGH-112617.txt # Conflicts: # scene/gui/rich_text_label.cpp
323b12e to
56d5a26
Compare
Use base font size Added docs and compatibility methods Fix compatibility methods maybe for real this time???? Please? Make width/height use floats instead of ints, and then make 1em be the height of surrounding text Fix documentation for floats instead of ints Update compatibility # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected # Conflicts: # misc/extension_api_validation/4.5-stable.expected Add compatibility breakages file # Conflicts: # misc/extension_api_validation/4.5-stable_4.6-stable/godotengineGH-112617.txt # Conflicts: # scene/gui/rich_text_label.cpp # Conflicts: # scene/gui/rich_text_label.cpp
56d5a26 to
b1806e0
Compare
Closes godotengine/godot-proposals#13609.
This PR allows
imgtags in RichTextLabels to specifyheightandwidthwith theemsuffix, which makes the values a percentage of the surrounding text's font size.For example, the following text:
Displays like this:
