|
@@ -1772,6 +1772,16 @@ void ProjectManager::_notification(int p_what) {
|
|
|
if (open_templates->is_visible()) {
|
|
|
open_templates->popup_centered_minsize();
|
|
|
}
|
|
|
+ real_t size = get_size().x / EDSCALE;
|
|
|
+ asset_library->set_columns(size < 1000 ? 1 : 2);
|
|
|
+ // Adjust names of tabs to fit the new size.
|
|
|
+ if (size < 650) {
|
|
|
+ local_projects_hb->set_name(TTR("Local"));
|
|
|
+ asset_library->set_name(TTR("Asset Library"));
|
|
|
+ } else {
|
|
|
+ local_projects_hb->set_name(TTR("Local Projects"));
|
|
|
+ asset_library->set_name(TTR("Asset Library Projects"));
|
|
|
+ }
|
|
|
} break;
|
|
|
case NOTIFICATION_READY: {
|
|
|
if (_project_list->get_project_count() == 0 && StreamPeerSSL::is_available()) {
|
|
@@ -1977,7 +1987,7 @@ void ProjectManager::_global_menu_action(const Variant &p_id, const Variant &p_m
|
|
|
void ProjectManager::_open_selected_projects() {
|
|
|
// Show loading text to tell the user that the project manager is busy loading.
|
|
|
// This is especially important for the HTML5 project manager.
|
|
|
- loading_label->set_modulate(Color(1, 1, 1));
|
|
|
+ loading_label->show();
|
|
|
|
|
|
const Set<String> &selected_list = _project_list->get_selected_project_keys();
|
|
|
|
|
@@ -2449,15 +2459,12 @@ ProjectManager::ProjectManager() {
|
|
|
tabs->set_tab_align(TabContainer::ALIGN_LEFT);
|
|
|
tabs->connect("tab_changed", this, "_on_tab_changed");
|
|
|
|
|
|
- HBoxContainer *tree_hb = memnew(HBoxContainer);
|
|
|
- projects_hb = tree_hb;
|
|
|
-
|
|
|
- projects_hb->set_name(TTR("Local Projects"));
|
|
|
-
|
|
|
- tabs->add_child(tree_hb);
|
|
|
+ local_projects_hb = memnew(HBoxContainer);
|
|
|
+ local_projects_hb->set_name(TTR("Local Projects"));
|
|
|
+ tabs->add_child(local_projects_hb);
|
|
|
|
|
|
VBoxContainer *search_tree_vb = memnew(VBoxContainer);
|
|
|
- tree_hb->add_child(search_tree_vb);
|
|
|
+ local_projects_hb->add_child(search_tree_vb);
|
|
|
search_tree_vb->set_h_size_flags(SIZE_EXPAND_FILL);
|
|
|
|
|
|
HBoxContainer *sort_filters = memnew(HBoxContainer);
|
|
@@ -2465,8 +2472,8 @@ ProjectManager::ProjectManager() {
|
|
|
loading_label->add_font_override("font", get_font("bold", "EditorFonts"));
|
|
|
loading_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
|
|
sort_filters->add_child(loading_label);
|
|
|
- // Hide the label but make it still take up space. This prevents reflows when showing the label.
|
|
|
- loading_label->set_modulate(Color(0, 0, 0, 0));
|
|
|
+ // The loading label is shown later.
|
|
|
+ loading_label->hide();
|
|
|
|
|
|
Label *sort_label = memnew(Label);
|
|
|
sort_label->set_text(TTR("Sort:"));
|
|
@@ -2481,7 +2488,6 @@ ProjectManager::ProjectManager() {
|
|
|
project_order_filter->set_filter_size(150);
|
|
|
sort_filters->add_child(project_order_filter);
|
|
|
project_order_filter->connect("filter_changed", this, "_on_order_option_changed");
|
|
|
- project_order_filter->set_custom_minimum_size(Size2(180, 10) * EDSCALE);
|
|
|
|
|
|
int projects_sorting_order = (int)EditorSettings::get_singleton()->get("project_manager/sorting_order");
|
|
|
project_order_filter->set_filter_option((ProjectListFilter::FilterOption)projects_sorting_order);
|
|
@@ -2489,7 +2495,7 @@ ProjectManager::ProjectManager() {
|
|
|
project_filter = memnew(ProjectListFilter);
|
|
|
project_filter->add_search_box();
|
|
|
project_filter->connect("filter_changed", this, "_on_filter_option_changed");
|
|
|
- project_filter->set_custom_minimum_size(Size2(280, 10) * EDSCALE);
|
|
|
+ project_filter->set_h_size_flags(SIZE_EXPAND_FILL);
|
|
|
sort_filters->add_child(project_filter);
|
|
|
|
|
|
search_tree_vb->add_child(sort_filters);
|
|
@@ -2507,7 +2513,7 @@ ProjectManager::ProjectManager() {
|
|
|
|
|
|
VBoxContainer *tree_vb = memnew(VBoxContainer);
|
|
|
tree_vb->set_custom_minimum_size(Size2(120, 120));
|
|
|
- tree_hb->add_child(tree_vb);
|
|
|
+ local_projects_hb->add_child(tree_vb);
|
|
|
|
|
|
Button *open = memnew(Button);
|
|
|
open->set_text(TTR("Edit"));
|
|
@@ -2622,6 +2628,12 @@ ProjectManager::ProjectManager() {
|
|
|
language_btn = memnew(OptionButton);
|
|
|
language_btn->set_flat(true);
|
|
|
language_btn->set_focus_mode(Control::FOCUS_NONE);
|
|
|
+#ifdef ANDROID_ENABLED
|
|
|
+ // The language selection dropdown doesn't work on Android (as the setting isn't saved), see GH-60353.
|
|
|
+ // Also, the dropdown it spawns is very tall and can't be scrolled without a hardware mouse.
|
|
|
+ // Hiding the language selection dropdown also leaves more space for the version label to display.
|
|
|
+ language_btn->hide();
|
|
|
+#endif
|
|
|
|
|
|
Vector<String> editor_languages;
|
|
|
List<PropertyInfo> editor_settings_properties;
|
|
@@ -2698,7 +2710,7 @@ ProjectManager::ProjectManager() {
|
|
|
gui_base->add_child(ask_update_settings);
|
|
|
|
|
|
// Define a minimum window size to prevent UI elements from overlapping or being cut off.
|
|
|
- OS::get_singleton()->set_min_window_size(Size2(750, 420) * EDSCALE);
|
|
|
+ OS::get_singleton()->set_min_window_size(Size2(520, 350) * EDSCALE);
|
|
|
|
|
|
// Resize the bootsplash window based on editor display scale.
|
|
|
const float scale_factor = MAX(1, EDSCALE);
|