diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-01-29 02:24:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-29 02:24:54 +0100 |
commit | 0d36281dff0255313150b3ea3b97467ebe58d0fb (patch) | |
tree | 3f203bbdef83da41c2db98aa6e0977c237e6b74d | |
parent | 2abaced90359d3cdcf33301d2ca556f3ef4e2e34 (diff) | |
parent | 068f4d88f691e0bebdf76e34ff21b5dfc15e637b (diff) |
Merge pull request #72178 from DarkMessiah/fix_graph_edit_minimap_connection
Fix connections drawing in GraphEdit minimap
-rw-r--r-- | scene/gui/graph_edit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index af52f6664a..dc23bcb14a 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -920,7 +920,8 @@ void GraphEdit::_draw_connection_line(CanvasItem *p_where, const Vector2 &p_from scaled_points.push_back(points[i] * p_zoom); } - p_where->draw_polyline_colors(scaled_points, colors, Math::floor(p_width * get_theme_default_base_scale()), lines_antialiased); + // Thickness below 0.5 doesn't look good on the graph or its minimap. + p_where->draw_polyline_colors(scaled_points, colors, MAX(0.5, Math::floor(p_width * get_theme_default_base_scale())), lines_antialiased); } void GraphEdit::_connections_layer_draw() { @@ -1088,7 +1089,7 @@ void GraphEdit::_minimap_draw() { from_color = from_color.lerp(activity_color, E.activity); to_color = to_color.lerp(activity_color, E.activity); } - _draw_connection_line(minimap, from_position, to_position, from_color, to_color, 0.1, minimap->_convert_from_graph_position(Vector2(zoom, zoom)).length()); + _draw_connection_line(minimap, from_position, to_position, from_color, to_color, 0.5, minimap->_convert_from_graph_position(Vector2(zoom, zoom)).length()); } // Draw the "camera" viewport. |