From dea845b65c37845898c5554aba20729bdeb6ba42 Mon Sep 17 00:00:00 2001 From: Gilles Roudiere Date: Thu, 17 Aug 2017 10:59:21 +0200 Subject: [PATCH] Fix progress dialog's bars overflowing. --- editor/progress_dialog.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp index 51a40faf377..980afee4471 100644 --- a/editor/progress_dialog.cpp +++ b/editor/progress_dialog.cpp @@ -155,9 +155,10 @@ void ProgressDialog::_popup() { Ref style = get_stylebox("panel", "PopupMenu"); ms += style->get_minimum_size(); - for (int i = 0; i < 4; i++) { - main->set_margin(Margin(i), style->get_margin(Margin(i))); - } + 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)); popup_centered(ms); }