Starlink / starjava

Java applications initially developed for the Starlink Project but now developed independently
Other
89 stars 24 forks source link

Scalable look and feel #5

Open pwdraper opened 8 years ago

pwdraper commented 8 years ago

High resolution screens make the fonts used in SPLAT and TOPCAT look very small. Complete the work on the scaledlaf branch to add a general system to give a scaled look to various parts of the UIs. Not ideal but better than nothing.

mbtaylor commented 7 years ago

@pwdraper,

I got round to making some progress on this at last (somebody with a hi-res screen complained).

I've pulled in the https://github.com/ernieyu/Swing-range-slider RangeSlider implementation you tracked down. Topcat still uses the JIDE one if it works, but if that fails (assumed due to L&F issues) then it falls back to using ernieyu. Seems to work OK, at least significantly better than before. I have pushed the relevant code to the scaledlaf branch for now.

I'm sure there's a lot of things (at least in topcat) that won't work well using scaled Nimbus, but people may find it better than nothing (Metal) on some displays. So I don't plan to use scaled Nimbus as topcat's default L&F any time soon (i.e. I won't use your f84d55a as it stands), but I probably will add some option (command-line flag or system property) for people to try it if they want.

I don't know what, if anything, you plan to do with SPLAT on this. If I play some more I will probably need to make some changes to the ScaledLookAndFeel class ... I wouldn't plan to do anything topcat-specific, but I can imagine it could get fiddly enough that fixes I make to get things working in topcat could have the odd negative effect on SPLAT. Or maybe not, who knows.

So I'd like to have the scaled L&F on the master branch in the forseeable future, used optionally but not by default in topcat. How do you think we should proceed:

pwdraper commented 7 years ago

If you want to make progress, then I'm happy for you to just do whatever is necessary to get TOPCAT working, and if I ever find any time I'll see how to make SPLAT work with what you have or not. So cherry pick to keep the scope of any changes limited for now.

mbtaylor commented 7 years ago

Thanks Peter. I think I'll play around locally to see what I can get working based on your work. If/when I make some progress I'll feed it back to the public repository and look at how it plays with splat.

Thanks for getting the ball rolling on this BTW, I'd have had no idea how to start.

mbtaylor commented 7 years ago

It appears to be the case that this issue fixes itself under java 9 - I don't understand the implementation details, but I have at least one report of a TOPCAT user with small fonts on java 8(?) on a HiDPI MS Windows 10 tablet, who has readable fonts on java 9, see https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=TOPCAT-USER;6bec640.1705 . I haven't tried SPLAT.

I'm tempted to treat this as an excuse to avoid doing any implementation work to fix it. Does anybody else want to perform more tests or comment?

pwdraper commented 7 years ago

Tried this out under Linux and don't see this effect. The fonts remained too small. That may be because the DPI of the display is still 96. That doesn't seem easy to change..

mbtaylor commented 6 years ago

I haven't made major progress on this, but I have added the non-Jide RangeSlider onto the master branch (59e685ae734- 90b034af8bcb3), so attempting to use e.g. Nimbus with TOPCAT will not now cause the thing to fail. The immediate stimulus for that was a report of the JIDE-OSS RangeSlider failing on OSX/Java10 for some L&F-related reason.

mbtaylor commented 5 years ago

This one rumbles on with people complaining about unreadably small topcat text on hi-def screens from time to time. There doesn't seem to be a one-size-fits-all solution, but as far as I can see either upgrading to Java 9+ (linux only?) or setting (e.g.) -Dsun.java2d.uiScale=2.5 seems to sort most people out. I've put an item to this effect in the TOPCAT FAQ. Unless it turns out neither of those work (for a significant number of users?) I'm not currently planning to make application code updates to address this.

pwdraper commented 5 years ago

OK, Dr. Moan seems to have stopped complaining at present (just lives with the small size). Since I'm not likely to look at this anytime soon, I can only agree, but let's keep it open until I see a solution working in Durham.

mbtaylor commented 5 years ago

Yes, I'm certainly interested in confirmed reports of fixes that either do or don't work.