diff --git a/src/core/graphics.rs b/src/core/graphics.rs index a580d76..71d20af 100644 --- a/src/core/graphics.rs +++ b/src/core/graphics.rs @@ -622,6 +622,10 @@ impl Graphics { pub fn change_layout(&mut self, layout: &Layout, mod_state: &[ModState]) { + let (width, height) = self.disp.size(); + self.x_scale = width as f64 / layout.width(); + self.y_scale = height as f64 / layout.height(); + self.rasterize_labels(layout); self.draw(layout, mod_state); }