layout: Update tile config in Column::add_tile_at()
Browse files at this commit10f04fd19de3bc2951d42411c237c8b963e6c816Parent: 79fd3091 changed file +3 -1
- src/layout/workspace.rs +3 -1
src/layout/workspace.rsmodified+3 -1
| @@ -3085,7 +3085,9 @@ impl<W: LayoutElement> Column<W> { | ||
| 3085 | 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 | 3091 | // Inserting a tile pushes down all tiles below it, but also in always-centering mode it |
| 3090 | 3092 | // will affect the X position of all tiles in the column. |
| 3091 | 3093 | let mut prev_offsets = Vec::with_capacity(self.tiles.len() + 1); |