Clear screen if a layer is shrinked

This commit is contained in:
Alexandre Bury 2016-10-02 15:33:55 -07:00
parent 3b3f403f7a
commit 9cf89c37de

View File

@ -105,7 +105,11 @@ impl View for StackView {
for layer in &mut self.layers { for layer in &mut self.layers {
// Give each guy what he asks for, within the budget constraints. // Give each guy what he asks for, within the budget constraints.
layer.size = Vec2::min(size, layer.view.get_min_size(size)); let size = Vec2::min(size, layer.view.get_min_size(size));
if !layer.size.fits_in(size) {
::B::clear();
}
layer.size = size;
layer.view.layout(layer.size); layer.view.layout(layer.size);
// We do it here instead of when adding a new layer because...? // We do it here instead of when adding a new layer because...?