mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Merge pull request #113804 from YeldhamDev/shader_file_btn_fix
Fix wrong size for "File" button in the shader editor
This commit is contained in:
@@ -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_list->show(); // Make sure the panel is visible, because it can't be toggled without open shaders.
|
||||||
shader_tabs->hide();
|
shader_tabs->hide();
|
||||||
files_split->add_child(file_menu);
|
files_split->add_child(file_menu);
|
||||||
|
file_menu->set_v_size_flags(Control::SIZE_SHRINK_BEGIN);
|
||||||
} else {
|
} else {
|
||||||
_switch_to_editor(edited_shaders[shader_tabs->get_current_tab()].shader_editor);
|
_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) {
|
if (file_menu->get_parent() != nullptr) {
|
||||||
file_menu->get_parent()->remove_child(file_menu);
|
file_menu->get_parent()->remove_child(file_menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
shader_tabs->show();
|
shader_tabs->show();
|
||||||
p_editor->use_menu_bar(file_menu);
|
p_editor->use_menu_bar(file_menu);
|
||||||
|
file_menu->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
if (p_focus) {
|
if (p_focus) {
|
||||||
TextShaderEditor *text_shader_editor = Object::cast_to<TextShaderEditor>(p_editor);
|
TextShaderEditor *text_shader_editor = Object::cast_to<TextShaderEditor>(p_editor);
|
||||||
if (text_shader_editor) {
|
if (text_shader_editor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user