You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Fix TextEdit placeholder with Inherited text direction.
This commit is contained in:
@@ -2943,7 +2943,11 @@ void TextEdit::_update_placeholder() {
|
|||||||
placeholder_data_buf->clear();
|
placeholder_data_buf->clear();
|
||||||
placeholder_data_buf->set_width(text.get_width());
|
placeholder_data_buf->set_width(text.get_width());
|
||||||
placeholder_data_buf->set_break_flags(text.get_brk_flags());
|
placeholder_data_buf->set_break_flags(text.get_brk_flags());
|
||||||
|
if (text_direction == Control::TEXT_DIRECTION_INHERITED) {
|
||||||
|
placeholder_data_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
|
||||||
|
} else {
|
||||||
placeholder_data_buf->set_direction((TextServer::Direction)text_direction);
|
placeholder_data_buf->set_direction((TextServer::Direction)text_direction);
|
||||||
|
}
|
||||||
placeholder_data_buf->set_preserve_control(draw_control_chars);
|
placeholder_data_buf->set_preserve_control(draw_control_chars);
|
||||||
placeholder_data_buf->add_string(placeholder_text, theme_cache.font, theme_cache.font_size, language);
|
placeholder_data_buf->add_string(placeholder_text, theme_cache.font, theme_cache.font_size, language);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user