Fix positioning of the Center View buttons in the GenericTilePolygonEditor.

This commit is contained in:
Relintai 2024-03-13 08:27:32 +01:00
parent ab43d163ba
commit 7f48c0055a

View File

@ -975,7 +975,9 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
root->add_child(editor_zoom_widget); root->add_child(editor_zoom_widget);
button_center_view = memnew(Button); button_center_view = memnew(Button);
button_center_view->set_anchors_and_margins_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5); button_center_view->set_anchors_and_margins_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE);
button_center_view->set_h_grow_direction(GrowDirection::GROW_DIRECTION_BEGIN);
button_center_view->set_v_grow_direction(GrowDirection::GROW_DIRECTION_END);
button_center_view->connect("pressed", this, "_center_view"); button_center_view->connect("pressed", this, "_center_view");
button_center_view->set_theme_type_variation("FlatButton"); button_center_view->set_theme_type_variation("FlatButton");
button_center_view->set_disabled(true); button_center_view->set_disabled(true);