diff options
Diffstat (limited to 'editor/progress_dialog.cpp')
-rw-r--r-- | editor/progress_dialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 46a656e0af..d6d8e5789e 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -50,7 +50,7 @@ void BackgroundProgress::_add_task(const String &p_task, const String &p_label, Control *ec = memnew(Control); ec->set_h_size_flags(SIZE_EXPAND_FILL); ec->set_v_size_flags(SIZE_EXPAND_FILL); - t.progress->set_anchors_and_margins_preset(Control::PRESET_WIDE); + t.progress->set_anchors_and_offsets_preset(Control::PRESET_WIDE); ec->add_child(t.progress); ec->set_custom_minimum_size(Size2(80, 5) * EDSCALE); t.hb->add_child(ec); @@ -111,7 +111,7 @@ void BackgroundProgress::task_step(const String &p_task, int p_step) { bool no_updates = true; { _THREAD_SAFE_METHOD_ - no_updates = updates.empty(); + no_updates = updates.is_empty(); } if (no_updates) { @@ -141,10 +141,10 @@ void ProgressDialog::_popup() { Ref<StyleBox> style = main->get_theme_stylebox("panel", "PopupMenu"); ms += style->get_minimum_size(); - main->set_margin(MARGIN_LEFT, style->get_margin(MARGIN_LEFT)); - main->set_margin(MARGIN_RIGHT, -style->get_margin(MARGIN_RIGHT)); - main->set_margin(MARGIN_TOP, style->get_margin(MARGIN_TOP)); - main->set_margin(MARGIN_BOTTOM, -style->get_margin(MARGIN_BOTTOM)); + main->set_offset(SIDE_LEFT, style->get_margin(SIDE_LEFT)); + main->set_offset(SIDE_RIGHT, -style->get_margin(SIDE_RIGHT)); + main->set_offset(SIDE_TOP, style->get_margin(SIDE_TOP)); + main->set_offset(SIDE_BOTTOM, -style->get_margin(SIDE_BOTTOM)); //raise(); popup_centered(ms); @@ -218,7 +218,7 @@ void ProgressDialog::end_task(const String &p_task) { memdelete(t.vb); tasks.erase(p_task); - if (tasks.empty()) { + if (tasks.is_empty()) { hide(); } else { _popup(); @@ -235,7 +235,7 @@ void ProgressDialog::_bind_methods() { ProgressDialog::ProgressDialog() { main = memnew(VBoxContainer); add_child(main); - main->set_anchors_and_margins_preset(Control::PRESET_WIDE); + main->set_anchors_and_offsets_preset(Control::PRESET_WIDE); set_exclusive(true); last_progress_tick = 0; singleton = this; |