summaryrefslogtreecommitdiff
path: root/scene/gui/dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/dialogs.cpp')
-rw-r--r--scene/gui/dialogs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index dedf44d407..8232a7a466 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -67,10 +67,10 @@ void WindowDialog::_fix_size() {
right = panel_texture->get_expand_margin_size(MARGIN_RIGHT);
} else if (panel->get_class() == "StyleBoxFlat") {
Ref<StyleBoxFlat> panel_flat = panel->cast_to<StyleBoxFlat>();
- top = panel_flat->_get_additional_border_size(MARGIN_TOP);
- left = panel_flat->_get_additional_border_size(MARGIN_LEFT);
- bottom = panel_flat->_get_additional_border_size(MARGIN_BOTTOM);
- right = panel_flat->_get_additional_border_size(MARGIN_RIGHT);
+ top = panel_flat->get_expand_margin_size(MARGIN_TOP);
+ left = panel_flat->get_expand_margin_size(MARGIN_LEFT);
+ bottom = panel_flat->get_expand_margin_size(MARGIN_BOTTOM);
+ right = panel_flat->get_expand_margin_size(MARGIN_RIGHT);
}
pos.x = MAX(left, MIN(pos.x, viewport_size.x - size.x - right));
@@ -215,7 +215,7 @@ void WindowDialog::_notification(int p_what) {
close_button->set_pressed_texture(get_icon("close", "WindowDialog"));
close_button->set_hover_texture(get_icon("close_highlight", "WindowDialog"));
close_button->set_anchor(MARGIN_LEFT, ANCHOR_END);
- close_button->set_begin(Point2(get_constant("close_h_ofs", "WindowDialog"), -get_constant("close_v_ofs", "WindowDialog")));
+ close_button->set_begin(Point2(-get_constant("close_h_ofs", "WindowDialog"), -get_constant("close_v_ofs", "WindowDialog")));
} break;
case NOTIFICATION_MOUSE_EXIT: {
@@ -546,7 +546,7 @@ AcceptDialog::AcceptDialog() {
label->set_anchor(MARGIN_RIGHT, ANCHOR_END);
label->set_anchor(MARGIN_BOTTOM, ANCHOR_END);
label->set_begin(Point2(margin, margin));
- label->set_end(Point2(margin, button_margin + 10));
+ label->set_end(Point2(-margin, -button_margin - 10));
//label->set_autowrap(true);
add_child(label);