aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-18 08:47:14 +0100
committerAkshay <[email protected]>2021-04-18 08:47:14 +0100
commit699375e14c63ca6f52b79b56de1d572c3497587a (patch)
treef9d7546248462946b5efbfec7b911e0daa6abb47
parent81488c3ea8d66680f739cee087ad9aa7619f5e0e (diff)
hide cursor in canvas
-rw-r--r--src/app.rs2
1 files changed, 2 insertions, 0 deletions
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> {
428 fn draw_brush(&mut self) { 428 fn draw_brush(&mut self) {
429 let cs = self.zoom as u32; 429 let cs = self.zoom as u32;
430 let pt = self.idx_at_coord(self.mouse); 430 let pt = self.idx_at_coord(self.mouse);
431 self.context.mouse().show_cursor(true);
431 if matches!(self.brush, Brush::Circle { .. } | Brush::Line { .. }) { 432 if matches!(self.brush, Brush::Circle { .. } | Brush::Line { .. }) {
432 let size = self.brush.size().unwrap(); 433 let size = self.brush.size().unwrap();
433 if let Some(center) = pt { 434 if let Some(center) = pt {
435 self.context.mouse().show_cursor(false);
434 let circle = self.pixmap.get_circle(center, size as u32, false); 436 let circle = self.pixmap.get_circle(center, size as u32, false);
435 for MapPoint { x, y } in circle.into_iter() { 437 for MapPoint { x, y } in circle.into_iter() {
436 self.canvas.set_draw_color(PINK); 438 self.canvas.set_draw_color(PINK);