From f59c147d1f9862558e02fdd12bc5e9209715f173 Mon Sep 17 00:00:00 2001
From: jsjtxietian <jsjtxietian@outlook.com>
Date: Wed, 13 Mar 2024 12:46:14 +0800
Subject: [PATCH] Fix center view button appears outside the 
 GenericTilePolygonEditor

---
 editor/plugins/tiles/tile_data_editors.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index 5845ddbb6e24..597fd7393f7b 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -946,8 +946,10 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
 
 	button_center_view = memnew(Button);
 	button_center_view->set_anchors_and_offsets_preset(Control::PRESET_TOP_RIGHT, Control::PRESET_MODE_MINSIZE, 5);
+	button_center_view->set_grow_direction_preset(Control::PRESET_TOP_RIGHT);
 	button_center_view->connect("pressed", callable_mp(this, &GenericTilePolygonEditor::_center_view));
 	button_center_view->set_theme_type_variation("FlatButton");
+	button_center_view->set_tooltip_text(TTR("Center View"));
 	button_center_view->set_disabled(true);
 	root->add_child(button_center_view);