summaryrefslogtreecommitdiff
path: root/tools/editor/plugins
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-05-30 19:53:19 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-05-30 19:53:19 -0300
commit4d6d6fcbfc9cd7e37ad38bb83c05f9260e50d5bc (patch)
treecdfe7df066d47960f53af46f90c4cc865db82f3e /tools/editor/plugins
parent0eb6c644b282440d3e83aaa4db6db2c48be46f8c (diff)
parent97b116dfc6db2d8706e2f64d1f51aec729497398 (diff)
Merge remote-tracking branch 'origin/master'
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
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp14
6 files changed, 19 insertions, 14 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: {
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 55485d8c92..f32d0448a2 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -3954,7 +3954,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
PopupMenu *p;
transform_menu = memnew( MenuButton );
- transform_menu->set_text("Transform");
+ transform_menu->set_text(TTR("Transform"));
hbc_menu->add_child( transform_menu );
p = transform_menu->get_popup();
@@ -3979,12 +3979,12 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_check_item(TTR("Use Default sRGB"),MENU_VIEW_USE_DEFAULT_SRGB);
p->add_separator();
- p->add_check_item("1 Viewport",MENU_VIEW_USE_1_VIEWPORT,KEY_MASK_CMD+KEY_1);
- p->add_check_item("2 Viewports",MENU_VIEW_USE_2_VIEWPORTS,KEY_MASK_CMD+KEY_2);
- p->add_check_item("2 Viewports (Alt)",MENU_VIEW_USE_2_VIEWPORTS_ALT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_2);
- p->add_check_item("3 Viewports",MENU_VIEW_USE_3_VIEWPORTS,KEY_MASK_CMD+KEY_3);
- p->add_check_item("3 Viewports (Alt)",MENU_VIEW_USE_3_VIEWPORTS_ALT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_3);
- p->add_check_item("4 Viewports",MENU_VIEW_USE_4_VIEWPORTS,KEY_MASK_CMD+KEY_4);
+ p->add_check_item(TTR("1 Viewport"),MENU_VIEW_USE_1_VIEWPORT,KEY_MASK_CMD+KEY_1);
+ p->add_check_item(TTR("2 Viewports"),MENU_VIEW_USE_2_VIEWPORTS,KEY_MASK_CMD+KEY_2);
+ p->add_check_item(TTR("2 Viewports (Alt)"),MENU_VIEW_USE_2_VIEWPORTS_ALT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_2);
+ p->add_check_item(TTR("3 Viewports"),MENU_VIEW_USE_3_VIEWPORTS,KEY_MASK_CMD+KEY_3);
+ p->add_check_item(TTR("3 Viewports (Alt)"),MENU_VIEW_USE_3_VIEWPORTS_ALT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_3);
+ p->add_check_item(TTR("4 Viewports"),MENU_VIEW_USE_4_VIEWPORTS,KEY_MASK_CMD+KEY_4);
p->add_separator();
p->add_check_item(TTR("Display Normal"),MENU_VIEW_DISPLAY_NORMAL);