fn adjust_box_pos(&mut self, container_size: Size) {
        let box_size = self.simple_box.layout_rect().size();
        self.pos.x += 2.;
        if self.pos.x + box_size.width > container_size.width {
            self.pos.x = 0.;
            self.pos.y += box_size.height;
            if self.pos.y + box_size.height > container_size.height {
                self.pos.y = 0.;
            }
        }
    }
/// Move the box towards the right, until it reaches the edge,
/// then reset it to the left but move it to another row.
Move the box towards the right, until it reaches the edge,
then reset it to the left but move it to another row.
Move the box towards the right until it reaches the edge then reset it to the left but move it to another row .
fn adjust_box_pos(&mut self, container_size: Size) {
        let box_size = self.simple_box.layout_rect().size();
        self.pos.x += 2.;
        if self.pos.x + box_size.width > container_size.width {
            self.pos.x = 0.;
            self.pos.y += box_size.height;
            if self.pos.y + box_size.height > container_size.height {
                self.pos.y = 0.;
            }
        }
    }
fn adjust_box_pos ( & mut self , container_size : Size ) { let box_size = self . simple_box . layout_rect ( ) . size ( ) ; self . pos . x += 2. ; if self . pos . x + box_size . width > container_size . width { self . pos . x = 0. ; self . pos . y += box_size . height ; if self . pos . y + box_size . height > container_size . height { self . pos . y = 0. ; } } }
Move the box towards the right, until it reaches the edge,
then reset it to the left but move it to another row.
Move the box towards the right until it reaches the edge then reset it to the left but move it to another row .
&mut self
container_size
Size
&mut self
container_size
Size