Merge pull request #116412 from YeldhamDev/marginalized_shader_editor
Fix `ShaderEditor`'s UI overflowing when shrunk
This commit is contained in:
commit
b5613b27e4
4 changed files with 3 additions and 10 deletions
|
|
@ -30,14 +30,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "scene/resources/shader.h"
|
||||
|
||||
class Button;
|
||||
class MenuButton;
|
||||
|
||||
class ShaderEditor : public Control {
|
||||
GDCLASS(ShaderEditor, Control);
|
||||
class ShaderEditor : public MarginContainer {
|
||||
GDCLASS(ShaderEditor, MarginContainer);
|
||||
|
||||
public:
|
||||
virtual void edit_shader(const Ref<Shader> &p_shader) = 0;
|
||||
|
|
|
|||
|
|
@ -208,7 +208,5 @@ public:
|
|||
void tag_saved_version();
|
||||
ShaderTextEditor *get_code_editor() { return code_editor; }
|
||||
|
||||
virtual Size2 get_minimum_size() const override { return Size2(0, 200); }
|
||||
|
||||
TextShaderEditor();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2566,10 +2566,6 @@ void VisualShaderEditor::_set_mode(int p_which) {
|
|||
set_current_shader_type((VisualShader::Type)saved_type);
|
||||
}
|
||||
|
||||
Size2 VisualShaderEditor::get_minimum_size() const {
|
||||
return Size2(10, 200);
|
||||
}
|
||||
|
||||
void VisualShaderEditor::update_toggle_files_button() {
|
||||
ERR_FAIL_NULL(toggle_files_list);
|
||||
bool forward = toggle_files_list->is_visible() == is_layout_rtl();
|
||||
|
|
|
|||
|
|
@ -684,7 +684,6 @@ public:
|
|||
Dictionary get_custom_node_data(Ref<VisualShaderNodeCustom> &p_custom_node);
|
||||
void update_custom_type(const Ref<Resource> &p_resource);
|
||||
|
||||
virtual Size2 get_minimum_size() const override;
|
||||
virtual void update_toggle_files_button() override;
|
||||
|
||||
Ref<VisualShader> get_visual_shader() const { return visual_shader; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue