Add pop-out button for grid mode and store defaults in settings
See original GitHub issue🚀 Feature
This would supersede #3007 and #2974 by adding a pop out to the grid button, accessible by right clicking it that would allow the user to set the grid size
as a 2-tuple of int (could be two int comboboxes > 0) and the stride could be a int combobox that could be negative or positive (0 should result in no grid). It should look like the pop out dialog for the play button

Clicking the button normally should toggle between grid enabled/ disabled.
The default values of size, stride, and enabled should also be stored in the settings. Changing the values in the popout shouldn’t change defaults (like is done with the play button) but changing values in settings should change values in popout.
How does this sound @haesleinhuepf @tlambert03? If agreed on this behaviour we can give to @ppwadhwa for the next sprint.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (15 by maintainers)
Thanks so much for this @liaprins-czi! Great to see it mocked out and I love the little help icon in
Definitely something we might want to use more of!
I’m thinking that we might want to go with
Grid stride
,Grid height
, andGrid width
as the three options. I findshape height
andshape width
a little funny as its not really the height of the shape, it was more the shape of the grid which has a height and width.Also @ppwadhwa is it possible to make a combobox which skips
0
as then we could use a combobox that goes-1, 1, 2, ...
for width/ height. And possibly one that goes... -2, -1, 1, 2, ....
for stride. I think having comboboxes for height and width will probably feel better than having free text though as the values are only integers.For tooltip help we could have the following for stride
and the following for height/ width.
The defaults are -1, -1 for
width
/height
and1
for stride, seehttps://github.com/napari/napari/blob/a8e618a742ef915ea3638a61592981fb17b2bd7f/napari/components/grid.py#L33-L34
Does this all sound good to @jni? Might be good to get one more look over (I’d also be open to rows/ columns instead of height/ width, but don’t have a strong feeling).
Maybe @liaprins-czi you can look over my suggestions above and if you agree can make an update mock that @ppwadhwa can then build against. Also happy to discuss more if you disagree with any. Thanks!!
Thanks, @liaprins-czi and @sofroniewn. I’m going to start putting this in place! 😃