Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix RichTextLabel BBCode img height percent

BrotherShort3b7d93b5ffe7
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index c60934be269..47f8cfc350d 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -6288,7 +6288,7 @@ void RichTextLabel::append_text(const String &p_bbcode) {
}
width = bbcode_value.substr(0, sep).to_float();
if (bbcode_value.substr(sep + 1).ends_with("%")) {
- width_unit = IMAGE_UNIT_PERCENT;
+ height_unit = IMAGE_UNIT_PERCENT;
}
height = bbcode_value.substr(sep + 1).to_float();
}