1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Implement Tree's internal minimum width calculation

This commit is contained in:
Gilles Roudière
2021-06-28 15:40:56 +02:00
parent b2dddc3c82
commit d7d32ced5b
20 changed files with 193 additions and 108 deletions

View File

@@ -882,19 +882,19 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->set_column_title(0, TTR("Name"));
tree->set_column_expand(0, true);
tree->set_column_min_width(0, 100 * EDSCALE);
tree->set_column_custom_minimum_width(0, 100 * EDSCALE);
tree->set_column_title(1, TTR("Path"));
tree->set_column_expand(1, true);
tree->set_column_min_width(1, 100 * EDSCALE);
tree->set_column_custom_minimum_width(1, 100 * EDSCALE);
tree->set_column_title(2, TTR("Global Variable"));
tree->set_column_expand(2, false);
// Reserve enough space for translations of "Global Variable" which may be longer.
tree->set_column_min_width(2, 150 * EDSCALE);
tree->set_column_custom_minimum_width(2, 150 * EDSCALE);
tree->set_column_expand(3, false);
tree->set_column_min_width(3, 120 * EDSCALE);
tree->set_column_custom_minimum_width(3, 120 * EDSCALE);
tree->connect("cell_selected", callable_mp(this, &EditorAutoloadSettings::_autoload_selected));
tree->connect("item_edited", callable_mp(this, &EditorAutoloadSettings::_autoload_edited));