brainglobe / cellfinder-napari

Efficient cell detection in large images using cellfinder in napari
https://brainglobe.info/documentation/cellfinder/index.html
BSD 3-Clause "New" or "Revised" License
23 stars 6 forks source link

Fix widget scrolling with magicgui>=0.5 #127

Closed dstansby closed 2 years ago

dstansby commented 2 years ago

magicgui 0.5 broke the scrollbars in cellfinder-napari. This was kind of unsurprising though, because the previous solution in cellfinder-napari was very hacky, and involved using private API in magicgui (always a bad idea...). This PR fixes that.

The fix is simple, and robust against future changes in magicgui - take the QtWidget magicgui provides, wrap it in a ScrollArea and return the ScrollArea.

Please could the reviewer manually check the scrollbar works with this PR and magicgui==0.5.1?

dstansby commented 2 years ago

😱 it seems like this breaks layer selection, so moving to draft

deprecated-napari-hub-preview-bot[bot] commented 2 years ago

Preview page for your plugin is ready here: https://preview.napari-hub.org/brainglobe/cellfinder-napari/127 Created: 2022-06-27T10:13:37.969835

codecov-commenter commented 2 years ago

Codecov Report

Merging #127 (c7d1cc5) into main (2a44950) will decrease coverage by 0.31%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   81.57%   81.25%   -0.32%     
==========================================
  Files          15       15              
  Lines         662      667       +5     
==========================================
+ Hits          540      542       +2     
- Misses        122      125       +3     
Impacted Files Coverage Δ
cellfinder_napari/detect/detect.py 48.33% <0.00%> (-3.40%) :arrow_down:
cellfinder_napari/detect/thread_worker.py 96.15% <0.00%> (+0.50%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2a44950...c7d1cc5. Read the comment docs.

dstansby commented 2 years ago

😱 it seems like this breaks layer selection, so moving to draft

I've opened an issue upstream for this: https://github.com/napari/napari/issues/4749

adamltyson commented 2 years ago

going to close this as magicgui now supports scrollbars.