| 957 | } |
| 958 | |
| 959 | Size2 GraphNode::get_minimum_size() const { |
| 960 | Ref<StyleBox> sb_panel = theme_cache.panel; |
| 961 | Ref<StyleBox> sb_titlebar = theme_cache.titlebar; |
| 962 | Ref<StyleBox> sb_slot = theme_cache.slot; |
| 963 | |
| 964 | int separation = theme_cache.separation; |
| 965 | Size2 minsize = titlebar_hbox->get_minimum_size() + sb_titlebar->get_minimum_size(); |
| 966 | |
| 967 | for (int i = 0; i < get_child_count(false); i++) { |
| 968 | Control *child = as_sortable_control(get_child(i, false)); |
| 969 | if (!child) { |
| 970 | continue; |
| 971 | } |
| 972 | |
| 973 | Size2i size = child->get_combined_minimum_size(); |
| 974 | size.width += sb_panel->get_minimum_size().width; |
| 975 | if (slot_table.has(i)) { |
| 976 | size += slot_table[i].draw_stylebox ? sb_slot->get_minimum_size() : Size2(); |
| 977 | } |
| 978 | |
| 979 | minsize.height += size.height; |
| 980 | minsize.width = MAX(minsize.width, size.width); |
| 981 | |
| 982 | if (i > 0) { |
| 983 | minsize.height += separation; |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | minsize.height += sb_panel->get_minimum_size().height; |
| 988 | |
| 989 | return minsize; |
| 990 | } |
| 991 | |
| 992 | void GraphNode::_port_pos_update() { |
| 993 | int edgeofs = theme_cache.port_h_offset; |
no test coverage detected