Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions editor/project_manager/project_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ void ProjectListItemControl::_notification(int p_what) {
if (pl) {
int idx = pl->get_index(this);
if (idx >= 0) {
// has_focus(true) is false on mouse-initiated focus, true on keyboard navigation.
pl->select_project(idx, !has_focus(true));
pl->ensure_project_visible(idx);
pl->select_project(idx);

pl->emit_signal(SNAME(ProjectList::SIGNAL_SELECTION_CHANGED));
}
Expand Down Expand Up @@ -356,6 +357,9 @@ ProjectListItemControl::ProjectListItemControl() {
set_focus_mode(FocusMode::FOCUS_ALL);
set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);

// Left spacer.
add_child(memnew(Control));

VBoxContainer *favorite_box = memnew(VBoxContainer);
favorite_box->set_alignment(BoxContainer::ALIGNMENT_CENTER);
add_child(favorite_box);
Expand Down Expand Up @@ -399,10 +403,6 @@ ProjectListItemControl::ProjectListItemControl() {

tag_container = memnew(HBoxContainer);
title_hb->add_child(tag_container);

Control *spacer = memnew(Control);
spacer->set_custom_minimum_size(Size2(10, 10));
title_hb->add_child(spacer);
}

// Bottom half, containing the path and view folder button.
Expand All @@ -414,6 +414,7 @@ ProjectListItemControl::ProjectListItemControl() {
explore_button = memnew(Button);
explore_button->set_name("ExploreButton");
explore_button->set_tooltip_auto_translate_mode(AUTO_TRANSLATE_MODE_ALWAYS);
explore_button->set_mouse_filter(MOUSE_FILTER_PASS);
explore_button->set_tooltip_text(TTRC("Open in file manager"));
explore_button->set_flat(true);
path_hb->add_child(explore_button);
Expand Down Expand Up @@ -448,19 +449,19 @@ ProjectListItemControl::ProjectListItemControl() {
last_edited_info->set_tooltip_text(TTRC("Last edited timestamp"));
last_edited_info->set_modulate(Color(1, 1, 1, 0.5));
path_hb->add_child(last_edited_info);

Control *spacer = memnew(Control);
spacer->set_custom_minimum_size(Size2(10, 10));
path_hb->add_child(spacer);
}

if (DisplayServer::get_singleton()->is_touchscreen_available()) {
touch_menu_button = memnew(Button);
touch_menu_button->set_theme_type_variation(SceneStringName(FlatButton));
touch_menu_button->set_v_size_flags(SIZE_SHRINK_CENTER);
add_child(touch_menu_button);
touch_menu_button->set_mouse_filter(MOUSE_FILTER_PASS);
touch_menu_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectListItemControl::_request_menu));
}

// Right spacer.
add_child(memnew(Control));
}

struct ProjectListComparator {
Expand Down
2 changes: 2 additions & 0 deletions editor/project_manager/project_tag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ProjectTag::ProjectTag(const String &p_text, bool p_display_close) {
add_child(cr);
cr->set_custom_minimum_size(Vector2(4, 0) * EDSCALE);
cr->set_color(tag_color);
cr->set_mouse_filter(MOUSE_FILTER_PASS);

button = memnew(Button);
add_child(button);
Expand All @@ -72,4 +73,5 @@ ProjectTag::ProjectTag(const String &p_text, bool p_display_close) {
button->set_accessibility_name(vformat(TTR("Project Tag: %s"), p_text));
button->set_icon_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
button->set_theme_type_variation(SNAME("ProjectTagButton"));
button->set_mouse_filter(MOUSE_FILTER_PASS);
}