diff options
Diffstat (limited to 'editor/import_dock.cpp')
-rw-r--r-- | editor/import_dock.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 6bb71ff491..4732268256 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -34,6 +34,7 @@ #include "editor/editor_node.h" #include "editor/editor_resource_preview.h" #include "editor/editor_scale.h" +#include "editor/editor_settings.h" class ImportDockParameters : public Object { GDCLASS(ImportDockParameters, Object); @@ -583,12 +584,12 @@ void ImportDock::_set_dirty(bool p_dirty) { // Add a dirty marker to notify the user that they should reimport the selected resource to see changes. import->set_text(TTR("Reimport") + " (*)"); import->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor"))); - import->set_tooltip(TTR("You have pending changes that haven't been applied yet. Click Reimport to apply changes made to the import options.\nSelecting another resource in the FileSystem dock without clicking Reimport first will discard changes made in the Import dock.")); + import->set_tooltip_text(TTR("You have pending changes that haven't been applied yet. Click Reimport to apply changes made to the import options.\nSelecting another resource in the FileSystem dock without clicking Reimport first will discard changes made in the Import dock.")); } else { // Remove the dirty marker on the Reimport button. import->set_text(TTR("Reimport")); import->remove_theme_color_override("font_color"); - import->set_tooltip(""); + import->set_tooltip_text(""); } } @@ -627,6 +628,9 @@ ImportDock::ImportDock() { content->add_margin_child(TTR("Import As:"), hb); import_as = memnew(OptionButton); import_as->set_disabled(true); + import_as->set_fit_to_longest_item(false); + import_as->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_ELLIPSIS); + import_as->set_h_size_flags(SIZE_EXPAND_FILL); import_as->connect("item_selected", callable_mp(this, &ImportDock::_importer_selected)); hb->add_child(import_as); import_as->set_h_size_flags(SIZE_EXPAND_FILL); @@ -671,7 +675,7 @@ ImportDock::ImportDock() { advanced->connect("pressed", callable_mp(this, &ImportDock::_advanced_options)); reimport_confirm = memnew(ConfirmationDialog); - reimport_confirm->get_ok_button()->set_text(TTR("Save Scenes, Re-Import, and Restart")); + reimport_confirm->set_ok_button_text(TTR("Save Scenes, Re-Import, and Restart")); content->add_child(reimport_confirm); reimport_confirm->connect("confirmed", callable_mp(this, &ImportDock::_reimport_and_restart)); |