Skip to content

Commit 18456f0

Browse files
committed
Merge branch 'fix-subgraph-ui-pos' into cam-control-graph-inputs
2 parents c60ec39 + 4877f5b commit 18456f0

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

material_maker/panels/graph_edit/graph_edit.gd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ signal preview_changed
6666

6767

6868
func _ready() -> void:
69-
$GraphUI.size.y = 0
7069
OS.low_processor_usage_mode = true
7170
center_view()
7271
for t in range(41):
@@ -1810,3 +1809,8 @@ func color_comment_nodes() -> void:
18101809
picker.popup_hide.connect(picker.queue_free)
18111810
picker.popup_hide.connect(undoredo.end_group)
18121811
picker.popup()
1812+
1813+
func _on_resized() -> void:
1814+
$GraphUI.size = Vector2.ZERO
1815+
$GraphUI.position = global_position
1816+
$GraphUI.position += Vector2(size.x - $GraphUI.size.x, 11)

material_maker/panels/graph_edit/graph_edit.tscn

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ one_shot = true
4141
[node name="GraphUI" type="HBoxContainer" parent="."]
4242
top_level = true
4343
custom_minimum_size = Vector2(0, 25)
44-
layout_mode = 0
44+
layout_mode = 1
45+
anchors_preset = 1
4546
anchor_left = 1.0
4647
anchor_right = 1.0
47-
offset_left = -711.0
48-
offset_top = 52.0
49-
offset_right = -13.0
50-
offset_bottom = 83.0
48+
offset_left = -1.0
49+
offset_right = 279.0
50+
offset_bottom = 31.0
51+
grow_horizontal = 0
5152
alignment = 2
5253

5354
[node name="SubGraphUI" type="HBoxContainer" parent="GraphUI"]
@@ -96,6 +97,7 @@ script = ExtResource("3")
9697
[connection signal="node_deselected" from="." to="." method="_on_GraphEdit_node_unselected"]
9798
[connection signal="node_selected" from="." to="." method="_on_GraphEdit_node_selected"]
9899
[connection signal="paste_nodes_request" from="." to="." method="paste"]
100+
[connection signal="resized" from="." to="." method="_on_resized"]
99101
[connection signal="visibility_changed" from="." to="." method="_on_GraphEdit_visibility_changed"]
100102
[connection signal="timeout" from="Timer" to="." method="do_send_changed_signal"]
101103
[connection signal="text_changed" from="GraphUI/SubGraphUI/Label" to="." method="_on_Label_text_changed"]

0 commit comments

Comments
 (0)