Merge pull request #8620 from Zylann/issue8617_window_dialog_stylebox
Fix #8617 WindowDialog with custom panel background crashes godot
This commit is contained in:
commit
28173ad35d
@ -54,6 +54,9 @@ void WindowDialog::_fix_size() {
|
||||
|
||||
// Windows require additional padding to keep the window chrome visible.
|
||||
Ref<StyleBoxTexture> panel = get_stylebox("panel", "WindowDialog");
|
||||
|
||||
// Check validity, because the theme could contain a different type of StyleBox
|
||||
if (panel.is_valid()) {
|
||||
float top = panel->get_expand_margin_size(MARGIN_TOP);
|
||||
float left = panel->get_expand_margin_size(MARGIN_LEFT);
|
||||
float bottom = panel->get_expand_margin_size(MARGIN_BOTTOM);
|
||||
@ -70,6 +73,7 @@ void WindowDialog::_fix_size() {
|
||||
set_size(size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool WindowDialog::has_point(const Point2 &p_point) const {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user