summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r--scene/gui/rich_text_label.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index b5b61e2631..a6c0c99bdb 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -230,10 +230,18 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
} else { \
int used = wofs - margin; \
switch (align) { \
- case ALIGN_LEFT: l.offset_caches.push_back(0); break; \
- case ALIGN_CENTER: l.offset_caches.push_back(((p_width - margin) - used) / 2); break; \
- case ALIGN_RIGHT: l.offset_caches.push_back(((p_width - margin) - used)); break; \
- case ALIGN_FILL: l.offset_caches.push_back(line_wrapped ? ((p_width - margin) - used) : 0); break; \
+ case ALIGN_LEFT: \
+ l.offset_caches.push_back(0); \
+ break; \
+ case ALIGN_CENTER: \
+ l.offset_caches.push_back(((p_width - margin) - used) / 2); \
+ break; \
+ case ALIGN_RIGHT: \
+ l.offset_caches.push_back(((p_width - margin) - used)); \
+ break; \
+ case ALIGN_FILL: \
+ l.offset_caches.push_back(line_wrapped ? ((p_width - margin) - used) : 0); \
+ break; \
} \
l.height_caches.push_back(line_height); \
l.ascent_caches.push_back(line_ascent); \