scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
66 stars 17 forks source link

Improve scaling for HiDPI displays #469

Open ctrueden opened 1 year ago

ctrueden commented 1 year ago

Here is how sciview looks when I first launch it on my laptop's 4K display (Ubuntu 22.04):

sciview-initial

Actually... The way it *really* looks is: ![sciview-initial-actual](https://github.com/scenerygraphics/sciview/assets/556626/42df1899-e945-49fc-9c8f-c280f321245c) But I think that's a separate issue; see #468.

After maximizing the window, it looks like this:

sciview-maximized

So:

  1. The node tree is too short; and
  2. The panel below with help text is somehow hosed up, starting in the middle of a sentence, and with weird line breaks unaligned with the actual width of the panel.

The node tree height and panel width can be fixed by dragging the dividers:

sciview-adjusted

But it's difficult because the divider grab width is only 1 pixel, so dragging them requires futzing around for a bit before the mouse pointer lines up exactly.

The side panel is also unfortunately quite unnecessarily wide in this case, compared to what is needed to modify node properties after selecting them. It would be nice if the help text would wrap dynamically to the width of the container, rather than having hardcoded line breaks. This could be accomplished using <html> with JTextPane, rather than the current JTextArea.

Related: #222