Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

`ShaderEditor`: Change custom minimum size to prevent overflow in editor at its minimum size

arkology20ee5546b406
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 851ef0f1c21..c6921c1b3de 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -9349,6 +9349,7 @@ EditorNode::EditorNode() {
Dictionary offsets;
offsets["Audio"] = -450;
offsets["Output"] = -270;
+ offsets["Shader Editor"] = -348;
default_layout->set_value(EDITOR_NODE_CONFIG_SECTION, "bottom_panel_offsets", offsets);
}
diff --git a/editor/script/script_editor_plugin.cpp b/editor/script/script_editor_plugin.cpp
index c0c925e7bf6..04b7b4cf774 100644
--- a/editor/script/script_editor_plugin.cpp
+++ b/editor/script/script_editor_plugin.cpp
@@ -635,7 +635,7 @@ DocumentList::DocumentList(ScriptEditor *p_script_editor) {
item_list = memnew(ItemList);
item_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
- item_list->set_custom_minimum_size(Size2(100, 60) * EDSCALE);
+ item_list->set_custom_minimum_size(Size2(60, 40) * EDSCALE);
item_list->set_v_size_flags(SIZE_EXPAND_FILL);
item_list->set_theme_type_variation("ItemListSecondary");
item_list->set_allow_rmb_select(true);
@@ -853,7 +853,7 @@ DocumentOutline::DocumentOutline(ScriptEditor *p_script_editor) {
tree->set_allow_rmb_select(true);
tree->set_hide_root(true);
tree->set_hide_folding(true);
- tree->set_custom_minimum_size(Size2(0, 60) * EDSCALE);
+ tree->set_custom_minimum_size(Size2(0, 40 * EDSCALE));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->connect(SceneStringName(item_selected), callable_mp(this, &DocumentOutline::_tree_selected));
add_child(tree);
diff --git a/editor/shader/shader_editor_plugin.cpp b/editor/shader/shader_editor_plugin.cpp
index 8f59e39a270..52046c84542 100644
--- a/editor/shader/shader_editor_plugin.cpp
+++ b/editor/shader/shader_editor_plugin.cpp
@@ -156,7 +156,6 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
shader_dock->set_dock_shortcut(ED_SHORTCUT_AND_COMMAND("bottom_panels/toggle_shader_editor_bottom_panel", TTRC("Toggle Shader Editor Dock"), KeyModifierMask::ALT | Key::S));
shader_dock->set_default_slot(EditorDock::DOCK_SLOT_BOTTOM);
shader_dock->set_available_layouts(EditorDock::DOCK_LAYOUT_HORIZONTAL | EditorDock::DOCK_LAYOUT_FLOATING);
- shader_dock->set_custom_minimum_size(Size2(460, 300) * EDSCALE);
EditorDockManager::get_singleton()->add_dock(shader_dock);
set_process_shortcut_input(true);
diff --git a/modules/visual_shader/editor/visual_shader_editor_plugin.cpp b/modules/visual_shader/editor/visual_shader_editor_plugin.cpp
index a0c74a00c06..80a21809624 100644
--- a/modules/visual_shader/editor/visual_shader_editor_plugin.cpp
+++ b/modules/visual_shader/editor/visual_shader_editor_plugin.cpp
@@ -6613,7 +6613,7 @@ VisualShaderEditor::VisualShaderEditor() {
graph = memnew(GraphEdit);
graph->set_v_size_flags(SIZE_EXPAND_FILL);
graph->set_h_size_flags(SIZE_EXPAND_FILL);
- graph->set_custom_minimum_size(Size2(200 * EDSCALE, 0));
+ graph->set_custom_minimum_size(Size2(260, 180) * EDSCALE);
graph->set_grid_pattern(GraphEdit::GridPattern::GRID_PATTERN_DOTS);
int grid_pattern = EDITOR_GET("editors/visual_editors/grid_pattern");
graph->set_grid_pattern((GraphEdit::GridPattern)grid_pattern);