1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Adapted godot to the new StyleBoxFlat

This commit is contained in:
toger5
2017-06-10 11:40:45 -07:00
parent f05e61ed09
commit 059a0496da
3 changed files with 64 additions and 83 deletions

View File

@@ -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));