Repository: napari/napari

Issue:
Mouse pointer is invisible when brush_size = 1 in labels layer
## 🐛 Bug

When drawing sparse annotations (e.g. for machine learning, pixel classifier) it is recommended to draw thin lines to avoid training with strongly correlating data. Unfortunately, the mouse pointer is invisible in napari when the brush_size is 1. 

## To Reproduce

Steps to reproduce the behavior:

1. Open napari
2. Open an image
3. Create a new labels layer
4. Set brush_size = 1 and start annotating

I cannot post a screenshot of an invisible mouse pointer because it would be invisible anyway.

## Expected behavior

When the brush_size is very small, e.g. < 3, a the cross mouse pointer should be shown.

## Environment

 - Please copy and paste the information at napari info option in help menubar here:
```
napari: 0.4.15
Platform: Windows-10-10.0.19044-SP0
Python: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:50:36) [MSC v.1929 64 bit (AMD64)]
Qt: 5.15.4
PyQt5: 5.15.7
NumPy: 1.23.3
SciPy: 1.9.1
Dask: 2022.9.1
VisPy: 0.9.6

OpenGL:
- GL version: 4.6.0 NVIDIA 512.78
- MAX_TEXTURE_SIZE: 32768

Screens:
- screen 1: resolution 1920x1200, scale 1.0

Plugins:
- PlatyMatch: 0.0.3
- RedLionfish: 0.6
- animation: 0.0.2
- clEsperanto: 0.19.0
- console: 0.0.4
- devbio_napari: 0.6.0
- napari-3d-ortho-viewer: 0.0.1
- napari-accelerated-pixel-and-object-classification: 0.10.0
- napari-assistant: 0.3.11
- napari-brightness-contrast: 0.1.7
- napari-clusters-plotter: 0.5.2
- napari-crop: 0.1.6
- napari-curtain: 0.1.1
- napari-folder-browser: 0.1.3
- napari-layer-details-display: 0.1.4
- napari-mouse-controls: 0.1.3
- napari-plot-profile: 0.2.1
- napari-plugin-search: 0.1.3
- napari-segment-blobs-and-things-with-membranes: 0.3.3
- napari-simpleitk-image-processing: 0.4.3
- napari-tabu: 0.1.5
- napari-time-slicer: 0.4.9
- napari-tools-menu: 0.1.17
- napari-workflow-inspector: 0.2.2
- napari-workflow-optimizer: 0.1.4
- napari_skimage_regionprops1: 0.5.3
- napari_skimage_regionprops2: 0.5.3
- scikit-image: 0.4.15
- svg: 0.1.6
- the-segmentation-game: 0.1.0
```
 - Any other relevant information:

## Additional context

I presume this might be different depending on the operating system. I'm using Windows 10.


Discussion:

Resolving patch:
diff --git a/napari/_qt/qt_viewer.py b/napari/_qt/qt_viewer.py
--- a/napari/_qt/qt_viewer.py
+++ b/napari/_qt/qt_viewer.py
@@ -861,21 +861,24 @@ def _on_interactive(self):
 
     def _on_cursor(self):
         """Set the appearance of the mouse cursor."""
+
         cursor = self.viewer.cursor.style
-        # Scale size by zoom if needed
-        if self.viewer.cursor.scaled:
-            size = self.viewer.cursor.size * self.viewer.camera.zoom
-        else:
+        if cursor in {'square', 'circle'}:
+
+            # Scale size by zoom if needed
             size = self.viewer.cursor.size
-        size = int(size)
-        if cursor == 'square':
+            if self.viewer.cursor.scaled:
+                size *= self.viewer.camera.zoom
+
+            size = int(size)
+
             # make sure the square fits within the current canvas
             if size < 8 or size > (min(*self.canvas.size) - 4):
                 q_cursor = self._cursors['cross']
+            elif cursor == 'circle':
+                q_cursor = QCursor(circle_pixmap(size))
             else:
                 q_cursor = QCursor(square_pixmap(size))
-        elif cursor == 'circle':
-            q_cursor = QCursor(circle_pixmap(size))
         elif cursor == 'crosshair':
             q_cursor = QCursor(crosshair_pixmap())
         else:


Test patch: