diff options
author | aryan-11825114 <nalinbro28@gmail.com> | 2024-08-17 15:01:05 +0530 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-16 17:09:50 +0200 |
commit | 433509b4893d11022b4a5bd4e63340e41c91aacd (patch) | |
tree | d6880d548f68128023dc5caa5074222063bb10a9 | |
parent | 139f5ee15e3802e6416977e1b5880837a5d57d11 (diff) | |
download | redot-engine-433509b4893d11022b4a5bd4e63340e41c91aacd.tar.gz |
Fix small graph editor pins at higher display scales
(cherry picked from commit 3f7efd229187f25fc4395b6a5b6fc5c518a9c285)
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index f4ce35f8f2..e55a17b945 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -115,8 +115,8 @@ void VSGraphNode::_draw_port(int p_slot_index, Point2i p_pos, bool p_left, const icon_offset = -port_icon->get_size() * 0.5; // Draw "shadow"/outline in the connection rim color. - draw_texture_rect(port_icon, Rect2(p_pos + icon_offset - Size2(2, 2), port_icon->get_size() + Size2(4, 4)), false, p_rim_color); - draw_texture(port_icon, p_pos + icon_offset, p_color); + draw_texture_rect(port_icon, Rect2(p_pos + (icon_offset - Size2(2, 2)) * EDSCALE, (port_icon->get_size() + Size2(4, 4)) * EDSCALE), false, p_rim_color); + draw_texture_rect(port_icon, Rect2(p_pos + icon_offset * EDSCALE, port_icon->get_size() * EDSCALE), false, p_color); } void VSGraphNode::draw_port(int p_slot_index, Point2i p_pos, bool p_left, const Color &p_color) { |