-Completely removed EmptyControl (but added fallback), closes #1017
This commit is contained in:
parent
0e1d70f637
commit
dc7ac86b79
13 changed files with 35 additions and 35 deletions
|
@ -1192,8 +1192,8 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
|
|||
undo_redo=p_editor->get_undo_redo();
|
||||
|
||||
int mw = EDITOR_DEF("grid_map/palette_min_width",230);
|
||||
EmptyControl *ec = memnew( EmptyControl);
|
||||
ec->set_minsize(Size2(mw,0));
|
||||
Control *ec = memnew( Control);
|
||||
ec->set_custom_minimum_size(Size2(mw,0));
|
||||
add_child(ec);
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "scene/main/viewport.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/texture_progress.h"
|
||||
#include "scene/gui/empty_control.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/button_array.h"
|
||||
#include "scene/gui/button_group.h"
|
||||
|
@ -272,7 +271,8 @@ void register_scene_types() {
|
|||
OS::get_singleton()->yield(); //may take time to init
|
||||
|
||||
ObjectTypeDB::register_type<Control>();
|
||||
ObjectTypeDB::register_type<EmptyControl>();
|
||||
// ObjectTypeDB::register_type<EmptyControl>();
|
||||
ObjectTypeDB::add_compatibility_type("EmptyControl","control");
|
||||
ObjectTypeDB::register_type<Button>();
|
||||
ObjectTypeDB::register_type<Label>();
|
||||
ObjectTypeDB::register_type<HScrollBar>();
|
||||
|
|
|
@ -2909,11 +2909,11 @@ void AnimationKeyEditor::set_anim_pos(float p_pos) {
|
|||
|
||||
void AnimationKeyEditor::_pane_drag(const Point2& p_delta) {
|
||||
|
||||
Size2 ecs = ec->get_minsize();
|
||||
Size2 ecs = ec->get_custom_minimum_size();
|
||||
ecs.y-=p_delta.y;
|
||||
if (ecs.y<100)
|
||||
ecs.y=100;
|
||||
ec->set_minsize(ecs);;
|
||||
ec->set_custom_minimum_size(ecs);;
|
||||
|
||||
}
|
||||
|
||||
|
@ -3296,8 +3296,8 @@ AnimationKeyEditor::AnimationKeyEditor(UndoRedo *p_undo_redo, EditorHistory *p_h
|
|||
|
||||
// menu->get_popup()->connect("item_pressed",this,"_menu_callback");
|
||||
|
||||
ec = memnew (EmptyControl);
|
||||
ec->set_minsize(Size2(0,50));
|
||||
ec = memnew (Control);
|
||||
ec->set_custom_minimum_size(Size2(0,50));
|
||||
add_child(ec);
|
||||
ec->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "scene/gui/scroll_bar.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
#include "scene/gui/file_dialog.h"
|
||||
#include "scene/gui/empty_control.h"
|
||||
|
||||
#include "scene/resources/animation.h"
|
||||
#include "scene/animation/animation_cache.h"
|
||||
#include "scene_tree_editor.h"
|
||||
|
@ -157,7 +157,7 @@ class AnimationKeyEditor : public VBoxContainer {
|
|||
PopupMenu *track_menu;
|
||||
PopupMenu *type_menu;
|
||||
|
||||
EmptyControl *ec;
|
||||
Control *ec;
|
||||
TextureFrame *zoomicon;
|
||||
HSlider *zoom;
|
||||
//MenuButton *menu;
|
||||
|
|
|
@ -1361,8 +1361,8 @@ EditorHelp::EditorHelp(EditorNode *p_editor) {
|
|||
|
||||
Separator *hs = memnew( VSeparator );
|
||||
panel_hb->add_child(hs);
|
||||
EmptyControl *ec = memnew( EmptyControl );
|
||||
ec->set_minsize(Size2(200,1));
|
||||
Control *ec = memnew( Control );
|
||||
ec->set_custom_minimum_size(Size2(200,1));
|
||||
panel_hb->add_child(ec);
|
||||
search = memnew( LineEdit );
|
||||
ec->add_child(search);
|
||||
|
|
|
@ -203,9 +203,9 @@ EditorLog::EditorLog() {
|
|||
tb->connect("pressed",this,"_close_request");
|
||||
|
||||
|
||||
ec = memnew( EmptyControl);
|
||||
ec = memnew( Control);
|
||||
vb->add_child(ec);
|
||||
ec->set_minsize(Size2(0,100));
|
||||
ec->set_custom_minimum_size(Size2(0,100));
|
||||
ec->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "scene/gui/label.h"
|
||||
#include "scene/gui/rich_text_label.h"
|
||||
#include "scene/gui/texture_button.h"
|
||||
#include "scene/gui/empty_control.h"
|
||||
//#include "scene/gui/empty_control.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/texture_frame.h"
|
||||
|
@ -50,7 +50,7 @@ class EditorLog : public PanelContainer {
|
|||
TextureButton *tb;
|
||||
HBoxContainer *title_hb;
|
||||
// PaneDrag *pd;
|
||||
EmptyControl *ec;
|
||||
Control *ec;
|
||||
|
||||
static void _error_handler(void *p_self, const char*p_func, const char*p_file,int p_line, const char*p_error,const char*p_errorexp,ErrorHandlerType p_type);
|
||||
|
||||
|
|
|
@ -3309,13 +3309,13 @@ EditorNode::EditorNode() {
|
|||
main_editor_tabs->connect("tab_changed",this,"_editor_select");
|
||||
HBoxContainer *srth = memnew( HBoxContainer );
|
||||
srt->add_child( srth );
|
||||
EmptyControl *tec = memnew( EmptyControl );
|
||||
tec->set_minsize(Size2(100,0));
|
||||
Control *tec = memnew( Control );
|
||||
tec->set_custom_minimum_size(Size2(100,0));
|
||||
tec->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
srth->add_child(tec);
|
||||
srth->add_child(main_editor_tabs);
|
||||
tec = memnew( EmptyControl );
|
||||
tec->set_minsize(Size2(100,0));
|
||||
tec = memnew( Control );
|
||||
tec->set_custom_minimum_size(Size2(100,0));
|
||||
srth->add_child(tec);
|
||||
tec->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
|
@ -3675,8 +3675,8 @@ EditorNode::EditorNode() {
|
|||
top_pallete->add_child(resources_dock);
|
||||
top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
EmptyControl *editor_spacer = memnew( EmptyControl );
|
||||
editor_spacer->set_minsize(Size2(260,200));
|
||||
Control *editor_spacer = memnew( Control );
|
||||
editor_spacer->set_custom_minimum_size(Size2(260,200));
|
||||
editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
editor_vsplit->add_child( editor_spacer );
|
||||
editor_spacer->add_child( top_pallete );
|
||||
|
@ -3687,8 +3687,8 @@ EditorNode::EditorNode() {
|
|||
|
||||
prop_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
|
||||
editor_spacer = memnew( EmptyControl );
|
||||
editor_spacer->set_minsize(Size2(260,200));
|
||||
editor_spacer = memnew( Control );
|
||||
editor_spacer->set_custom_minimum_size(Size2(260,200));
|
||||
editor_spacer->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||
editor_vsplit->add_child( editor_spacer );
|
||||
editor_spacer->add_child( prop_pallete );
|
||||
|
|
|
@ -718,8 +718,8 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
|||
undo_redo = editor->get_undo_redo();
|
||||
|
||||
int mw = EDITOR_DEF("tile_map/palette_min_width",80);
|
||||
EmptyControl *ec = memnew( EmptyControl);
|
||||
ec->set_minsize(Size2(mw,0));
|
||||
Control *ec = memnew( Control);
|
||||
ec->set_custom_minimum_size(Size2(mw,0));
|
||||
add_child(ec);
|
||||
|
||||
// Add tile palette
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#include "progress_dialog.h"
|
||||
#include "main/main.h"
|
||||
#include "message_queue.h"
|
||||
#include "scene/gui/empty_control.h"
|
||||
|
||||
|
||||
void BackgroundProgress::_add_task(const String& p_task,const String& p_label, int p_steps) {
|
||||
|
||||
|
@ -43,12 +43,12 @@ void BackgroundProgress::_add_task(const String& p_task,const String& p_label, i
|
|||
t.progress = memnew( ProgressBar );
|
||||
t.progress->set_max(p_steps);
|
||||
t.progress->set_val(p_steps);
|
||||
EmptyControl *ec = memnew( EmptyControl );
|
||||
Control *ec = memnew( Control );
|
||||
ec->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
ec->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
t.progress->set_area_as_parent_rect();
|
||||
ec->add_child(t.progress);
|
||||
ec->set_minsize(Size2(80,5));
|
||||
ec->set_custom_minimum_size(Size2(80,5));
|
||||
t.hb->add_child(ec);
|
||||
|
||||
add_child(t.hb);
|
||||
|
|
|
@ -1240,8 +1240,8 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
|
|||
group_options->add_child(atlas_preview);
|
||||
atlas_preview->show();
|
||||
atlas_preview->connect("pressed",this,"_group_atlas_preview");
|
||||
EmptyControl *ec = memnew(EmptyControl );
|
||||
ec->set_minsize(Size2(150,1));
|
||||
Control *ec = memnew(Control );
|
||||
ec->set_custom_minimum_size(Size2(150,1));
|
||||
gvb->add_child(ec);
|
||||
|
||||
VBoxContainer *group_vb_right = memnew( VBoxContainer );
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "os/dir_access.h"
|
||||
#include "os/thread.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "scene/gui/empty_control.h"
|
||||
|
||||
#include "scene/gui/slider.h"
|
||||
#include "tools/editor/editor_file_system.h"
|
||||
#include "property_editor.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
#include "scene/gui/empty_control.h"
|
||||
|
||||
#include "scene/gui/texture_frame.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
#include "io/resource_saver.h"
|
||||
|
@ -580,8 +580,8 @@ void ProjectManager::_load_recent_projects() {
|
|||
|
||||
VBoxContainer *vb = memnew(VBoxContainer);
|
||||
hb->add_child(vb);
|
||||
EmptyControl *ec = memnew( EmptyControl );
|
||||
ec->set_minsize(Size2(0,1));
|
||||
Control *ec = memnew( Control );
|
||||
ec->set_custom_minimum_size(Size2(0,1));
|
||||
vb->add_child(ec);
|
||||
Label *title = memnew( Label(project_name) );
|
||||
title->add_font_override("font",get_font("large","Fonts"));
|
||||
|
|
Loading…
Reference in a new issue