diff options
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/gpu_particles_3d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | scene/gui/code_edit.cpp | 6 | ||||
-rw-r--r-- | scene/gui/tabs.cpp | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 5fda1c76ef..ab857dc3ad 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -501,6 +501,10 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da error->set_text(0, time); error->set_text_align(0, TreeItem::ALIGN_LEFT); + const Color color = get_theme_color(oe.warning ? SNAME("warning_color") : SNAME("error_color"), SNAME("Editor")); + error->set_custom_color(0, color); + error->set_custom_color(1, color); + String error_title; if (oe.callstack.size() > 0) { // If available, use the script's stack in the error title. diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp index 903a3689b0..5ac58795d1 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp @@ -362,6 +362,7 @@ void GPUParticles3DEditor::_generate_emission_points() { Ref<ImageTexture> tex; tex.instantiate(); + tex->create_from_image(image); Ref<ParticlesMaterial> material = node->get_process_material(); ERR_FAIL_COND(material.is_null()); @@ -390,6 +391,7 @@ void GPUParticles3DEditor::_generate_emission_points() { Ref<ImageTexture> tex2; tex2.instantiate(); + tex2->create_from_image(image2); material->set_emission_normal_texture(tex2); } else { diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 5d1106bb41..c7d1d7ef82 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -227,17 +227,17 @@ void CodeEdit::_notification(int p_what) { end = font->get_string_size(line.substr(0, line.rfind(String::chr(0xFFFF))), font_size).x; } - Point2 round_ofs = hint_ofs + sb->get_offset() + Vector2(0, font->get_ascent() + font_height * i + yofs); + Point2 round_ofs = hint_ofs + sb->get_offset() + Vector2(0, font->get_ascent(font_size) + font_height * i + yofs); round_ofs = round_ofs.round(); draw_string(font, round_ofs, line.replace(String::chr(0xFFFF), ""), HALIGN_LEFT, -1, font_size, font_color); if (end > 0) { // Draw an underline for the currently edited function parameter. - const Vector2 b = hint_ofs + sb->get_offset() + Vector2(begin, font_height + font_height * i + line_spacing); + const Vector2 b = hint_ofs + sb->get_offset() + Vector2(begin, font_height + font_height * i + yofs); draw_line(b, b + Vector2(end - begin, 0), font_color, 2); // Draw a translucent text highlight as well. const Rect2 highlight_rect = Rect2( - hint_ofs + sb->get_offset() + Vector2(begin, 0), + b - Vector2(0, font_height), Vector2(end - begin, font_height)); draw_rect(highlight_rect, font_color * Color(1, 1, 1, 0.2)); } diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index 3ca2d1c1e9..deb5c364cb 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -241,6 +241,7 @@ void Tabs::_shape(int p_tab) { tabs.write[p_tab].xl_text = atr(tabs[p_tab].text); tabs.write[p_tab].text_buf->clear(); + tabs.write[p_tab].text_buf->set_width(-1); if (tabs[p_tab].text_direction == Control::TEXT_DIRECTION_INHERITED) { tabs.write[p_tab].text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR); } else { @@ -529,7 +530,6 @@ bool Tabs::get_offset_buttons_visible() const { void Tabs::set_tab_title(int p_tab, const String &p_title) { ERR_FAIL_INDEX(p_tab, tabs.size()); tabs.write[p_tab].text = p_title; - tabs.write[p_tab].xl_text = atr(p_title); _shape(p_tab); update(); minimum_size_changed(); |