diff options
author | Akshay <[email protected]> | 2021-04-18 08:47:14 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-04-18 08:47:14 +0100 |
commit | 699375e14c63ca6f52b79b56de1d572c3497587a (patch) | |
tree | f9d7546248462946b5efbfec7b911e0daa6abb47 /src | |
parent | 81488c3ea8d66680f739cee087ad9aa7619f5e0e (diff) |
hide cursor in canvas
Diffstat (limited to 'src')
-rw-r--r-- | src/app.rs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |