mirror of https://github.com/godotengine/godot
Merge pull request #112717 from arkology/project-manager-ui-height
Fix `ProjectManager` UI going below window
This commit is contained in:
commit
779fd0a14a
|
|
@ -1645,9 +1645,16 @@ ProjectManager::ProjectManager() {
|
|||
|
||||
project_list_sidebar->add_child(memnew(HSeparator));
|
||||
|
||||
ScrollContainer *sidebar_scroll_containter = memnew(ScrollContainer);
|
||||
sidebar_scroll_containter->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
|
||||
sidebar_scroll_containter->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
project_list_sidebar->add_child(sidebar_scroll_containter);
|
||||
VBoxContainer *sidebar_buttons_containter = memnew(VBoxContainer);
|
||||
sidebar_scroll_containter->add_child(sidebar_buttons_containter);
|
||||
|
||||
open_btn_container = memnew(HBoxContainer);
|
||||
open_btn_container->set_anchors_preset(Control::PRESET_FULL_RECT);
|
||||
project_list_sidebar->add_child(open_btn_container);
|
||||
sidebar_buttons_containter->add_child(open_btn_container);
|
||||
|
||||
open_btn = memnew(Button);
|
||||
open_btn->set_text(TTRC("Edit"));
|
||||
|
|
@ -1676,39 +1683,35 @@ ProjectManager::ProjectManager() {
|
|||
run_btn->set_text(TTRC("Run"));
|
||||
run_btn->set_shortcut(ED_SHORTCUT("project_manager/run_project", TTRC("Run Project"), KeyModifierMask::CMD_OR_CTRL | Key::R));
|
||||
run_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_run_project));
|
||||
project_list_sidebar->add_child(run_btn);
|
||||
sidebar_buttons_containter->add_child(run_btn);
|
||||
|
||||
rename_btn = memnew(Button);
|
||||
rename_btn->set_text(TTRC("Rename"));
|
||||
// The F2 shortcut isn't overridden with Enter on macOS as Enter is already used to edit a project.
|
||||
rename_btn->set_shortcut(ED_SHORTCUT("project_manager/rename_project", TTRC("Rename Project"), Key::F2));
|
||||
rename_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_rename_project));
|
||||
project_list_sidebar->add_child(rename_btn);
|
||||
sidebar_buttons_containter->add_child(rename_btn);
|
||||
|
||||
duplicate_btn = memnew(Button);
|
||||
duplicate_btn->set_text(TTRC("Duplicate"));
|
||||
duplicate_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_duplicate_project));
|
||||
project_list_sidebar->add_child(duplicate_btn);
|
||||
sidebar_buttons_containter->add_child(duplicate_btn);
|
||||
|
||||
manage_tags_btn = memnew(Button);
|
||||
manage_tags_btn->set_text(TTRC("Manage Tags"));
|
||||
manage_tags_btn->set_shortcut(ED_SHORTCUT("project_manager/project_tags", TTRC("Manage Tags"), KeyModifierMask::CMD_OR_CTRL | Key::T));
|
||||
project_list_sidebar->add_child(manage_tags_btn);
|
||||
sidebar_buttons_containter->add_child(manage_tags_btn);
|
||||
|
||||
erase_btn = memnew(Button);
|
||||
erase_btn->set_text(TTRC("Remove"));
|
||||
erase_btn->set_shortcut(ED_SHORTCUT("project_manager/remove_project", TTRC("Remove Project"), Key::KEY_DELETE));
|
||||
erase_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_project));
|
||||
project_list_sidebar->add_child(erase_btn);
|
||||
sidebar_buttons_containter->add_child(erase_btn);
|
||||
|
||||
erase_missing_btn = memnew(Button);
|
||||
erase_missing_btn->set_text(TTRC("Remove Missing"));
|
||||
erase_missing_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_missing_projects));
|
||||
project_list_sidebar->add_child(erase_missing_btn);
|
||||
|
||||
Control *filler = memnew(Control);
|
||||
filler->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
project_list_sidebar->add_child(filler);
|
||||
sidebar_buttons_containter->add_child(erase_missing_btn);
|
||||
|
||||
donate_btn = memnew(Button);
|
||||
donate_btn->set_text(TTRC("Donate"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue