Fixes min size of various editor plugins on HiDPI
* AnimationTree * AudioStream * ResourcePreloader * ShaderEditor * VisualShaderEditor
This commit is contained in:
parent
b563de702c
commit
65e2230f6e
@ -39,6 +39,7 @@
|
||||
#include "core/os/input.h"
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/animation/animation_blend_tree.h"
|
||||
#include "scene/animation/animation_player.h"
|
||||
#include "scene/gui/menu_button.h"
|
||||
@ -284,7 +285,7 @@ AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
anim_tree_editor = memnew(AnimationTreeEditor);
|
||||
anim_tree_editor->set_custom_minimum_size(Size2(0, 300));
|
||||
anim_tree_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
|
||||
|
||||
button = editor->add_bottom_panel_item(TTR("AnimationTree"), anim_tree_editor);
|
||||
button->hide();
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/audio_stream_preview.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
|
||||
void AudioStreamEditor::_notification(int p_what) {
|
||||
@ -208,7 +209,7 @@ void AudioStreamEditor::_bind_methods() {
|
||||
|
||||
AudioStreamEditor::AudioStreamEditor() {
|
||||
|
||||
set_custom_minimum_size(Size2(1, 100));
|
||||
set_custom_minimum_size(Size2(1, 100) * EDSCALE);
|
||||
_current = 0;
|
||||
_dragging = false;
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/project_settings.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
|
||||
void ResourcePreloaderEditor::_gui_input(Ref<InputEvent> p_event) {
|
||||
@ -438,7 +439,7 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node)
|
||||
|
||||
editor = p_node;
|
||||
preloader_editor = memnew(ResourcePreloaderEditor);
|
||||
preloader_editor->set_custom_minimum_size(Size2(0, 250));
|
||||
preloader_editor->set_custom_minimum_size(Size2(0, 250) * EDSCALE);
|
||||
|
||||
button = editor->add_bottom_panel_item(TTR("ResourcePreloader"), preloader_editor);
|
||||
button->hide();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/os/os.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "editor/editor_settings.h"
|
||||
#include "editor/property_editor.h"
|
||||
#include "servers/visual/shader_types.h"
|
||||
@ -756,7 +757,7 @@ ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node) {
|
||||
editor = p_node;
|
||||
shader_editor = memnew(ShaderEditor(p_node));
|
||||
|
||||
shader_editor->set_custom_minimum_size(Size2(0, 300));
|
||||
shader_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
|
||||
button = editor->add_bottom_panel_item(TTR("Shader"), shader_editor);
|
||||
button->hide();
|
||||
}
|
||||
|
@ -2852,7 +2852,7 @@ VisualShaderEditorPlugin::VisualShaderEditorPlugin(EditorNode *p_node) {
|
||||
|
||||
editor = p_node;
|
||||
visual_shader_editor = memnew(VisualShaderEditor);
|
||||
visual_shader_editor->set_custom_minimum_size(Size2(0, 300));
|
||||
visual_shader_editor->set_custom_minimum_size(Size2(0, 300) * EDSCALE);
|
||||
|
||||
button = editor->add_bottom_panel_item(TTR("VisualShader"), visual_shader_editor);
|
||||
button->hide();
|
||||
|
Loading…
Reference in New Issue
Block a user