3dem / relion

Image-processing software for cryo-electron microscopy
https://relion.readthedocs.io/en/latest/
GNU General Public License v2.0
444 stars 197 forks source link

Fltk 4K display query #987

Open mapaulson opened 12 months ago

mapaulson commented 12 months ago

Apologies for logging this here - not sure where the best forum is.

Not a bug per se, but a compilation query. I've been using Relion on a HiDPI display (4K) and the GUI is extremely small - certainly for my eyes. This is despite having 200% scaling enabled in the desktop environment (GNOME). Looking at the Fltk website, it appears the current release which Relion fetches if FORCE_OWN_FLTK is set (1.3.5) does not support HiDPI displays. However the Fltk 1.4 (development) branch does. I've recompiled Relion against Fltk 1.4 and the GUI now correctly picks up the DE scaling factor and displays at a reasonable size. So far, I've not noticed any issues with functionality. Are the developers aware of anything here that might be problematic with using this approach? Thanks!

Environment:

biochem-fan commented 12 months ago

Thank you very much for your report.

We have never tried FLTK 1.4. We feel reluctant to use FLTK 1.4 by default as it is not yet marked as a stable release but this is nevertheless very useful information. Can you upload your patch here so that others can try it when necessary?

mapaulson commented 12 months ago

There was no patch as such - I simply built Relion as usual, specifying -DFORCE_OWN_FLTK=ON, then "git clone https://github.com/fltk/fltk" in the relion/external/fltk directory, overwriting the 1.3.5 source. I had to build it using cmake rather than autoconf/make to get it to build shared libraries properly (e.g. cmake fltk -DOPTION_BUILD_SHARED_LIBS=ON). Then re-built Relion with the new 1.4. libraries. I've tried modifying the BuildFLTK.cmake in the Relion tree to do this more elegantly, but had some problems in passing the installation prefix to the configuration (this is not my speciality).

With regard to using the HiDPI version, my main concern was that functions involving GUI mouse events (e.g. particle picking) might not work correctly - I believe this has been a problem with some other software on HiDPI displays. I checked this doing some manual picking it the Fltk-1.4 build then re-reading them in the normal (1.3.5) build and vice versa. As far as I can see everything seems ok, and coordinates are correct, but I have not investigated everything extensively. I realise that building against an unstable external library is not ideal, but so far no problems.

Hope this helps.