forge
Explore
Log in

Don't you dare go Hollow

layout: Update tile config in Column::add_tile_at()

Browse files at this commit

10f04fd19de3bc2951d42411c237c8b963e6c816Ivan MolodetskikhParent: 79fd309
src/layout/workspace.rsmodified+3 -1
@@ -3085,7 +3085,9 @@ impl<W: LayoutElement> Column<W> {
30853085 self.active_tile_idx = idx;
30863086 }
30873087
3088- fn add_tile_at(&mut self, idx: usize, tile: Tile<W>, animate: bool) {
3088+ fn add_tile_at(&mut self, idx: usize, mut tile: Tile<W>, animate: bool) {
3089+ tile.update_config(self.scale, self.options.clone());
3090+
30893091 // Inserting a tile pushes down all tiles below it, but also in always-centering mode it
30903092 // will affect the X position of all tiles in the column.
30913093 let mut prev_offsets = Vec::with_capacity(self.tiles.len() + 1);