Update the minimum size of ViewportContainer
This commit is contained in:
parent
6e4f9b56c9
commit
621cf7d8d5
2 changed files with 7 additions and 0 deletions
|
@ -54,6 +54,7 @@ Size2 ViewportContainer::get_minimum_size() const {
|
|||
|
||||
void ViewportContainer::set_stretch(bool p_enable) {
|
||||
stretch = p_enable;
|
||||
minimum_size_changed();
|
||||
queue_sort();
|
||||
update();
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "scene/gui/panel.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
#include "scene/gui/popup_menu.h"
|
||||
#include "scene/gui/viewport_container.h"
|
||||
#include "scene/main/canvas_layer.h"
|
||||
#include "scene/main/timer.h"
|
||||
#include "scene/resources/mesh.h"
|
||||
|
@ -714,6 +715,11 @@ void Viewport::set_size(const Size2 &p_size) {
|
|||
size = p_size.floor();
|
||||
VS::get_singleton()->viewport_set_size(viewport, size.width, size.height);
|
||||
|
||||
ViewportContainer *c = Object::cast_to<ViewportContainer>(get_parent());
|
||||
if (c) {
|
||||
c->minimum_size_changed();
|
||||
}
|
||||
|
||||
_update_stretch_transform();
|
||||
update_configuration_warning();
|
||||
|
||||
|
|
Loading…
Reference in a new issue