You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Set auto translate mode for drag previews
- Controls
- `LineEdit`, `TextEdit`: Always disabled since it's dragging user input.
- `TabBar`: Use the same auto translate mode as the node.
- `RichTextLabel`: Always disable since auto translation is done
differently from other controls (selection text you get
programmatically is always after auto translation).
- Editor
- Disable drag preview auto translation if the text is user input,
filename, or class name.
- Also disabled unexpected auto translation for audio bus effect names.
This commit is contained in:
@@ -5663,6 +5663,7 @@ Dictionary EditorNode::drag_resource(const Ref<Resource> &p_res, Control *p_from
|
||||
Control *drag_control = memnew(Control);
|
||||
TextureRect *drag_preview = memnew(TextureRect);
|
||||
Label *label = memnew(Label);
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
Ref<Texture2D> preview;
|
||||
|
||||
@@ -5715,6 +5716,7 @@ Dictionary EditorNode::drag_files_and_dirs(const Vector<String> &p_paths, Contro
|
||||
HBoxContainer *hbox = memnew(HBoxContainer);
|
||||
TextureRect *icon = memnew(TextureRect);
|
||||
Label *label = memnew(Label);
|
||||
label->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
|
||||
|
||||
if (p_paths[i].ends_with("/")) {
|
||||
label->set_text(p_paths[i].substr(0, p_paths[i].length() - 1).get_file());
|
||||
|
||||
Reference in New Issue
Block a user