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> {
3085 self.active_tile_idx = idx;3085 self.active_tile_idx = idx;
3086 }3086 }
3087 3087
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+
3089 // Inserting a tile pushes down all tiles below it, but also in always-centering mode it3091 // Inserting a tile pushes down all tiles below it, but also in always-centering mode it
3090 // will affect the X position of all tiles in the column.3092 // will affect the X position of all tiles in the column.
3091 let mut prev_offsets = Vec::with_capacity(self.tiles.len() + 1);3093 let mut prev_offsets = Vec::with_capacity(self.tiles.len() + 1);