1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Fix wrong size for "File" button in the shader editor

This commit is contained in:
Michael Alexsander
2025-12-09 12:45:04 -03:00
parent 757bba192e
commit e20b45f653

View File

@@ -461,6 +461,7 @@ void ShaderEditorPlugin::_close_shader(int p_index) {
shader_list->show(); // Make sure the panel is visible, because it can't be toggled without open shaders.
shader_tabs->hide();
files_split->add_child(file_menu);
file_menu->set_v_size_flags(Control::SIZE_SHRINK_BEGIN);
} else {
_switch_to_editor(edited_shaders[shader_tabs->get_current_tab()].shader_editor);
}
@@ -768,8 +769,11 @@ void ShaderEditorPlugin::_switch_to_editor(ShaderEditor *p_editor, bool p_focus)
if (file_menu->get_parent() != nullptr) {
file_menu->get_parent()->remove_child(file_menu);
}
shader_tabs->show();
p_editor->use_menu_bar(file_menu);
file_menu->set_v_size_flags(Control::SIZE_EXPAND_FILL);
if (p_focus) {
TextShaderEditor *text_shader_editor = Object::cast_to<TextShaderEditor>(p_editor);
if (text_shader_editor) {