summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/plugins')
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp9
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp4
5 files changed, 12 insertions, 7 deletions
diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp
index 12d50cd4b8..300e35f94d 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -7,7 +7,7 @@
#include "scene/resources/sample.h"
#include "scene/resources/mesh.h"
#include "scene/resources/bit_mask.h"
-
+#include "tools/editor/editor_scale.h"
bool EditorTexturePreviewPlugin::handles(const String& p_type) const {
return (ObjectTypeDB::is_type(p_type,"ImageTexture") || ObjectTypeDB::is_type(p_type, "AtlasTexture"));
@@ -36,6 +36,7 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
img.clear_mipmaps();
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
if (img.is_compressed()) {
if (img.decompress()!=OK)
return Ref<Texture>();
@@ -111,6 +112,7 @@ Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
Image img(bm->get_size().width,bm->get_size().height,0,Image::FORMAT_GRAYSCALE,data);
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
if (img.is_compressed()) {
if (img.decompress()!=OK)
return Ref<Texture>();
@@ -233,6 +235,7 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) {
VS::get_singleton()->mesh_surface_set_material(sphere,0,RID());
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
img.resize(thumbnail_size,thumbnail_size);
Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture ));
@@ -401,6 +404,7 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES& p_from) {
int line = 0;
int col=0;
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
Image img(thumbnail_size,thumbnail_size,0,Image::FORMAT_RGBA);
@@ -501,7 +505,7 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
-
+ thumbnail_size*=EDSCALE;
DVector<uint8_t> img;
int w = thumbnail_size;
int h = thumbnail_size;
@@ -815,6 +819,7 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) {
VS::get_singleton()->instance_set_base(mesh_instance,RID());
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ thumbnail_size*=EDSCALE;
img.resize(thumbnail_size,thumbnail_size);
Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture ));
diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp
index 4ef2815a32..f4258836e5 100644
--- a/tools/editor/plugins/material_editor_plugin.cpp
+++ b/tools/editor/plugins/material_editor_plugin.cpp
@@ -294,7 +294,7 @@ MaterialEditor::MaterialEditor() {
}
- set_custom_minimum_size(Size2(1,150));
+ set_custom_minimum_size(Size2(1,150)*EDSCALE);
HBoxContainer *hb = memnew( HBoxContainer );
add_child(hb);
diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp
index ecf17fec19..51a436e58d 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -141,7 +141,7 @@ MeshEditor::MeshEditor() {
- set_custom_minimum_size(Size2(1,150));
+ set_custom_minimum_size(Size2(1,150)*EDSCALE);
HBoxContainer *hb = memnew( HBoxContainer );
add_child(hb);
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index f9217e47fa..a3891a648b 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -404,7 +404,7 @@ SampleEditor::SampleEditor() {
play->connect("pressed", this,"_play_pressed");
stop->connect("pressed", this,"_stop_pressed");
- set_custom_minimum_size(Size2(1,150));
+ set_custom_minimum_size(Size2(1,150)*EDSCALE);
}
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 6d87777a79..2453ff3190 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -978,7 +978,7 @@ void ScriptEditor::_menu_option(int p_option) {
switch(p_option) {
case FILE_NEW: {
script_create_dialog->config("Node", ".gd");
- script_create_dialog->popup_centered(Size2(300, 300));
+ script_create_dialog->popup_centered(Size2(300, 300)*EDSCALE);
} break;
case FILE_OPEN: {
@@ -1100,7 +1100,7 @@ void ScriptEditor::_menu_option(int p_option) {
switch(p_option) {
case FILE_NEW: {
script_create_dialog->config("Node", ".gd");
- script_create_dialog->popup_centered(Size2(300, 300));
+ script_create_dialog->popup_centered(Size2(300, 300)*EDSCALE);
} break;
case FILE_SAVE: {