From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Dec 09 2019 - 08:52:07 CST

Here is more discussion of FLTK new/experimental support for
high-DPI screens on Linux, etc:
  https://www.fltk.org/doc-1.4/drawing.html
  https://groups.google.com/forum/#!topic/fltkgeneral/qS-A50x6owk
  https://github.com/fltk/fltk/issues/31
  https://savannah.gnu.org/bugs/?52878 (both Qt and FLTK)

Best,
  John

On Mon, Dec 09, 2019 at 08:37:49AM -0600, John Stone wrote:
> Well, it's not a perfect solution, but the bleeding edge
> FLTK 1.4.0 developmental branch has a new feature meant to
> address high-DPI screens. It isn't as clean and foolproof as
> what was done for MacOS X, in part because X-Windows itself
> takes no particular action for high-DPI screens by default,
> but FLTK 1.4.x now has a global "scale factor" that can be used
> to impact all drawn widgets on a per-screen basis:
> https://www.fltk.org/doc-1.4/drawing.html
>
> If you read through that section, you can see there are various
> complications that make this global scale factor somewhat less
> than ideal in various cases, but all that being said,
> considering what people with 4K resolution laptops have been dealing
> with until now, this looks like a huge step in the right direction,
> and while not perfect, it will probably be MUCH MUCH better than
> the way things have been up to this point.
>
> Since we have to build the MacOS X versions of VMD against either
> an unreleased FLTK 1.4.0 or a patched 1.3.x, version already, I'm
> tempted to try 1.4.0 on Linux for the purposes of high-DPI support
> and see if it holds water. Even if it's not perfect, I think it will
> be a large positive step toward addressing high-DPI screens on Linux.
>
> It's unclear to me if there's a comparable change for Tcl/Tk on Linux,
> but that is the next thing that'd need to be addressed. This is worth
> digging into on the Tcl/Tk 8.6.x and 8.7.x discussion lists...
>
> Best,
> John
>
> On Mon, Dec 09, 2019 at 01:56:19PM +0100, Tatiana Kuznetsova wrote:
> >    Hi,
> >
> > Sorry for hijacking the thread, but do the latest FLTK changes mean
> > there is hope for high-DP support in Linux?
> >
> > Regards
> >
> > Tatiana Kuznetsova
> >
> > On 07/12/2019 17.34, John Stone wrote:
> > >Hi,
> > > You'll find that a few plugins won't work correctly due to changes
> > >in Tk 8.6, but we're working on updating those that are affected.
> > >
> > >The issues with use of the retina displays hinge upon the support in the
> > >latest FLTK and Tk implementations. FLTK versions >= 1.3.5 now have hooks to
> > >enable OpenGL use of the full native resolution display with the use of
> > >some MacOS-specific APIs, but this has no impact on the display of GUI
> > >widgets GUI text labels, menus, etc. I'm not sure if FLTK 1.4.x has
> > >gone further here or not:
> > > https://www.fltk.org/doc-1.3/osissues.html#osissues_macos
> > >
> > >For Tk, the retina issues seem to be more problematic as I haven't
> > >(yet) found any deep discussion of these problems even now,
> > >several years after the introduction of the first retina hardware.
> > >Some people have done work to make resizable widgets, which is important,
> > >but the various plugins in VMD use a huge variety of GUI widgets and
> > >I'm sure that the coverage of resizable widgets falls far short of
> > >what the VMD plugins are already using currently. There's at least
> > >some useful discussion here:
> > > https://wiki.tcl-lang.org/page/High+Resolution+Displays
> > > https://wiki.tcl-lang.org/page/User+Interface+Design%3A+Sizing+of+Elements
> > >
> > >The release notes for Tcl/Tk 8.5.16 list improved retina support
> > >as a feature, but I have no idea what this really means:
> > > https://wiki.tcl-lang.org/page/Changes+in+Tcl%2FTk+8.5.16
> > >I also saw this discussion that looks somewhat interesting also,
> > >I haven't tried hacking the .app bundle Plist files yet:
> > > https://stackoverflow.com/questions/12318172/show-images-using-python-tkinter-on-scaled-e-g-retina-displays
> > >
> > >Best,
> > > John
> > >
> > >On Sat, Dec 07, 2019 at 02:32:21PM +0100, FX wrote:
> > >>Hi everyone,
> > >>
> > >>I have updated the build, at the same URL: https://www.dropbox.com/s/700vi9kkpglf6m6/VMD%201.9.4a38.zip?dl=0
> > >>The new build should have all plugins working, no more warnings and missing plugins.
> > >>
> > >>Remaining issue: VMD is working in low-resolution on ???Retina??? displays. This affects the OpenGL window, as well as all interface elements (menus, text, etc.). This is particularly difficult for extension windows, whose text is smaller and where the low-res version is hard to read.
> > >>
> > >>Best regards,
> > >>FX
> > >>
> > >>--
> > >>Dr. François-Xavier Coudert
> > >>Senior Researcher / Directeur de Recherche
> > >>CNRS, PSL University, Chimie ParisTech
> > >>Webpage: https://www.coudert.name/
> > >>
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/