You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix GraphFrame autoshrink with high DPI displays/custom UI scales
This commit is contained in:
@@ -133,9 +133,9 @@ void VSRerouteNode::_notification(int p_what) {
|
||||
connect(SceneStringName(mouse_exited), callable_mp(this, &VSRerouteNode::_on_mouse_exited));
|
||||
} break;
|
||||
case NOTIFICATION_DRAW: {
|
||||
Vector2 offset = Vector2(0, -16);
|
||||
Vector2 offset = Vector2(0, -16 * EDSCALE);
|
||||
Color drag_bg_color = get_theme_color(SNAME("drag_background"), SNAME("VSRerouteNode"));
|
||||
draw_circle(get_size() * 0.5 + offset, 16, Color(drag_bg_color, selected ? 1 : icon_opacity));
|
||||
draw_circle(get_size() * 0.5 + offset, 16 * EDSCALE, Color(drag_bg_color, selected ? 1 : icon_opacity), true, -1, true);
|
||||
|
||||
Ref<Texture2D> icon = get_editor_theme_icon(SNAME("ToolMove"));
|
||||
Point2 icon_offset = -icon->get_size() * 0.5 + get_size() * 0.5 + offset;
|
||||
@@ -154,6 +154,7 @@ VSRerouteNode::VSRerouteNode() {
|
||||
title_lbl->hide();
|
||||
|
||||
const Size2 size = Size2(32, 32) * EDSCALE;
|
||||
print_line("VSRerouteNode size: " + size);
|
||||
|
||||
Control *slot_area = memnew(Control);
|
||||
slot_area->set_custom_minimum_size(size);
|
||||
|
||||
Reference in New Issue
Block a user