qupath / qupath-extension-omero-web

QuPath extension to work with images through OMERO's web API
GNU General Public License v3.0
8 stars 12 forks source link

IconFactory.PathIcons.STAR doesn't exists anymore #24

Open Rdornier opened 1 year ago

Rdornier commented 1 year ago

Bug report

Describe the bug IconFactory.PathIcons.STAR doesn't exists anymore and seems to not be replaced by any other icon (code here). This icon was used to show rating stars from OMERO when the user right clicks on an image from the OMERO browser and click on more info (line that does not compile anymore is here). If the image contains a rating on OMERO, then it throws an error and the menu does not appear.

To Reproduce Steps to reproduce the behavior:

  1. Install OMERO extension
  2. Browse an image on OMERO that contain a rating start (at least one)
  3. Right click on the image in the browser and select more info.
  4. Bug appears

Expected behavior Having the menu appears with star icons. Is there a way to replace this line by something else (other icons stored somewhere else) ?

Desktop (please complete the following information):

petebankhead commented 1 year ago

It should be possible to use pretty much any JavaFX Node - for example an icon from FontAwesome through ControlsFX.

(I still plan to revisit the OMERO extension, but haven't even quite manage to 'finish' releasing v0.4.0 yet - currently working on updating StarDist first.)

Rdornier commented 1 year ago

Thanks for your fast answer. By looking at the link you gave, I manage to replace IconFactory.createNode(QuPathGUI.TOOLBAR_ICON_SIZE, QuPathGUI.TOOLBAR_ICON_SIZE, IconFactory.PathIcons.STAR) by GlyphFontRegistry.font("icomoon").create("\u2605").size(QuPathGUI.TOOLBAR_ICON_SIZE).color(javafx.scene.paint.Color.GRAY) and no more error is then thrown.

Thanks again for your help Best,

Rémy.

petebankhead commented 1 year ago

I've transferred this issue, since the icon was intentionally removed from QuPath (I presume...) - but a replacement needs to be added here.