Browse Source

Merge pull request #13831 from guilhermefelipecgs/fix_button_preview_camera_alignment

Fix alignment for button preview_camera
Andreas Haas 7 years ago
parent
commit
4170e8f3df
1 changed files with 2 additions and 0 deletions
  1. 2 0
      editor/plugins/spatial_editor_plugin.cpp

+ 2 - 0
editor/plugins/spatial_editor_plugin.cpp

@@ -3389,6 +3389,8 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
 	preview_camera->set_toggle_mode(true);
 	preview_camera->set_toggle_mode(true);
 	preview_camera->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE);
 	preview_camera->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE);
 	preview_camera->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
 	preview_camera->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
+	preview_camera->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, -10 * EDSCALE);
+	preview_camera->set_h_grow_direction(GROW_DIRECTION_BEGIN);
 	preview_camera->set_text(TTR("preview"));
 	preview_camera->set_text(TTR("preview"));
 	surface->add_child(preview_camera);
 	surface->add_child(preview_camera);
 	preview_camera->hide();
 	preview_camera->hide();