From 699375e14c63ca6f52b79b56de1d572c3497587a Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 18 Apr 2021 13:17:14 +0530 Subject: hide cursor in canvas --- src/app.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/app.rs b/src/app.rs index 5ba8fb1..a987e0b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -428,9 +428,11 @@ impl<'ctx> AppState<'ctx> { fn draw_brush(&mut self) { let cs = self.zoom as u32; let pt = self.idx_at_coord(self.mouse); + self.context.mouse().show_cursor(true); if matches!(self.brush, Brush::Circle { .. } | Brush::Line { .. }) { let size = self.brush.size().unwrap(); if let Some(center) = pt { + self.context.mouse().show_cursor(false); let circle = self.pixmap.get_circle(center, size as u32, false); for MapPoint { x, y } in circle.into_iter() { self.canvas.set_draw_color(PINK); -- cgit v1.2.3