PolarizedLightFieldMicroscopy / napari-LF

Light field imaging plugin for napari
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Make the method of toggling between modes clear #47

Closed gschlafly closed 1 year ago

gschlafly commented 1 year ago

Description

It is unclear how to toggle between the processing modes of LF Analyze and Neural Net. There is also a slight glitch to how the images are being swapped.

Screenshots

image

Files

Solution ideas

  1. Change the cursor type when hovering over the button. This can be done with the PointingHandCursor of Qcursor (https://doc.qt.io/qtforpython-5/PySide2/QtGui/QCursor.html#PySide2.QtGui.PySide2.QtGui.QCursor.setShape).
  2. When hovering over the button, replace the button image with a slightly brighter image. This would require @gschlafly making similar brighter images. This was done here, but then we updated the font to improve the contrast.

It seems that by importing qtpy we gain both PyQt and PySide functionality (https://github.com/spyder-ide/qtpy).

The hovering functionality is implemented here, but no affect is observed when hovering the mouse over the button. https://github.com/PolarizedLightFieldMicroscopy/napari-LF/blob/29deddb2e54c5952cbc5cb61e9030811576b8e2f/src/napari_lf/_widgetLF_gui.py#L1970-L1984

gschlafly commented 1 year ago

I created now alternative images in 5840475beec2c74a43224ee9fc7de1662ed80839 that can be used when hovering over the buttons. The buttons appeared larger than desired on the widget, so as a temporary solution I put a half-resolution image as the pixmap_pressed variable of the PicButton. Their file paths are shown below. https://github.com/PolarizedLightFieldMicroscopy/napari-LF/blob/fa9ee62b354f1922f8e60c10d292042dba0f1592/src/napari_lf/_widgetLF_vals.py#L8-L18

Snag_2e5febe Snag_2e608f0