summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp15
-rw-r--r--editor/plugins/script_editor_plugin.cpp5
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp21
4 files changed, 23 insertions, 20 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index bdfe380211..2b9c625aa4 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -557,7 +557,7 @@ void AnimationPlayerEditor::_animation_blend() {
String current = animation->get_item_text(animation->get_selected());
- blend_editor.dialog->popup_centered(Size2(400, 400));
+ blend_editor.dialog->popup_centered(Size2(400, 400) * EDSCALE);
blend_editor.tree->set_hide_root(true);
blend_editor.tree->set_column_min_width(0, 10);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 4b216d63f5..4c9b988d7f 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2806,6 +2806,9 @@ void CanvasItemEditor::_notification(int p_what) {
unlock_button->set_icon(get_icon("Unlock", "EditorIcons"));
group_button->set_icon(get_icon("Group", "EditorIcons"));
ungroup_button->set_icon(get_icon("Ungroup", "EditorIcons"));
+ key_loc_button->set_icon(get_icon("KeyPosition", "EditorIcons"));
+ key_rot_button->set_icon(get_icon("KeyRotation", "EditorIcons"));
+ key_scale_button->set_icon(get_icon("KeyScale", "EditorIcons"));
key_insert_button->set_icon(get_icon("Key", "EditorIcons"));
zoom_minus->set_icon(get_icon("ZoomLess", "EditorIcons"));
@@ -3949,30 +3952,24 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_hb->add_child(memnew(VSeparator));
animation_hb->hide();
- key_loc_button = memnew(Button("loc"));
+ key_loc_button = memnew(Button);
key_loc_button->set_toggle_mode(true);
key_loc_button->set_flat(true);
key_loc_button->set_pressed(true);
key_loc_button->set_focus_mode(FOCUS_NONE);
- key_loc_button->add_color_override("font_color", Color(1, 0.6, 0.6));
- key_loc_button->add_color_override("font_color_pressed", Color(0.6, 1, 0.6));
key_loc_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_POS));
animation_hb->add_child(key_loc_button);
- key_rot_button = memnew(Button("rot"));
+ key_rot_button = memnew(Button);
key_rot_button->set_toggle_mode(true);
key_rot_button->set_flat(true);
key_rot_button->set_pressed(true);
key_rot_button->set_focus_mode(FOCUS_NONE);
- key_rot_button->add_color_override("font_color", Color(1, 0.6, 0.6));
- key_rot_button->add_color_override("font_color_pressed", Color(0.6, 1, 0.6));
key_rot_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_ROT));
animation_hb->add_child(key_rot_button);
- key_scale_button = memnew(Button("scl"));
+ key_scale_button = memnew(Button);
key_scale_button->set_toggle_mode(true);
key_scale_button->set_flat(true);
key_scale_button->set_focus_mode(FOCUS_NONE);
- key_scale_button->add_color_override("font_color", Color(1, 0.6, 0.6));
- key_scale_button->add_color_override("font_color_pressed", Color(0.6, 1, 0.6));
key_scale_button->connect("pressed", this, "_popup_callback", varray(ANIM_INSERT_SCALE));
animation_hb->add_child(key_scale_button);
key_insert_button = memnew(Button);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 477d440f28..d56756502d 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -467,6 +467,8 @@ void ScriptEditor::_update_recent_scripts() {
recent_scripts->add_separator();
recent_scripts->add_shortcut(ED_SHORTCUT("script_editor/clear_recent", TTR("Clear Recent Files")));
+
+ recent_scripts->set_as_minsize();
}
void ScriptEditor::_open_recent_script(int p_idx) {
@@ -474,7 +476,7 @@ void ScriptEditor::_open_recent_script(int p_idx) {
// clear button
if (p_idx == recent_scripts->get_item_count() - 1) {
previous_scripts.clear();
- _update_recent_scripts();
+ call_deferred("_update_recent_scripts");
return;
}
@@ -2240,6 +2242,7 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_live_auto_reload_running_scripts", &ScriptEditor::_live_auto_reload_running_scripts);
ClassDB::bind_method("_unhandled_input", &ScriptEditor::_unhandled_input);
ClassDB::bind_method("_script_changed", &ScriptEditor::_script_changed);
+ ClassDB::bind_method("_update_recent_scripts", &ScriptEditor::_update_recent_scripts);
ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script);
ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 3b6eeb61d6..6c12b62272 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -43,10 +43,10 @@ void SpriteFramesEditor::_notification(int p_what) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
- load->set_icon(get_icon("Folder", "EditorIcons"));
- _delete->set_icon(get_icon("Del", "EditorIcons"));
- new_anim->set_icon(get_icon("New", "EditorIcons"));
- remove_anim->set_icon(get_icon("Del", "EditorIcons"));
+ load->set_icon(get_icon("Load", "EditorIcons"));
+ _delete->set_icon(get_icon("Remove", "EditorIcons"));
+ new_anim->set_icon(get_icon("Add", "EditorIcons"));
+ remove_anim->set_icon(get_icon("Remove", "EditorIcons"));
}
if (p_what == NOTIFICATION_READY) {
@@ -667,7 +667,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
VBoxContainer *vbc_animlist = memnew(VBoxContainer);
split->add_child(vbc_animlist);
- vbc_animlist->set_custom_minimum_size(Size2(150, 0));
+ vbc_animlist->set_custom_minimum_size(Size2(150, 0) * EDSCALE);
//vbc_animlist->set_v_size_flags(SIZE_EXPAND_FILL);
VBoxContainer *sub_vb = memnew(VBoxContainer);
@@ -678,12 +678,13 @@ SpriteFramesEditor::SpriteFramesEditor() {
sub_vb->add_child(hbc_animlist);
new_anim = memnew(Button);
+ new_anim->set_flat(true);
hbc_animlist->add_child(new_anim);
+ new_anim->set_h_size_flags(SIZE_EXPAND_FILL);
new_anim->connect("pressed", this, "_animation_add");
- hbc_animlist->add_spacer();
-
remove_anim = memnew(Button);
+ remove_anim->set_flat(true);
hbc_animlist->add_child(remove_anim);
remove_anim->connect("pressed", this, "_animation_remove");
@@ -720,6 +721,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
//animations = memnew( ItemList );
load = memnew(Button);
+ load->set_flat(true);
load->set_tooltip(TTR("Load Resource"));
hbc->add_child(load);
@@ -736,14 +738,15 @@ SpriteFramesEditor::SpriteFramesEditor() {
hbc->add_child(empty2);
move_up = memnew(Button);
- move_up->set_text(TTR("Up"));
+ move_up->set_text(TTR("Move (Before)"));
hbc->add_child(move_up);
move_down = memnew(Button);
- move_down->set_text(TTR("Down"));
+ move_down->set_text(TTR("Move (After)"));
hbc->add_child(move_down);
_delete = memnew(Button);
+ _delete->set_flat(true);
hbc->add_child(_delete);
file = memnew(EditorFileDialog);