Column label top-align inaccurate
USE CASE: WHAT DO YOU WANT TO DO?
Align column labels to the top
STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)
- Run treeview on Ubuntu 16.04
- Top-align the labels in any file (most notably small_133x133.cdt)
CURRENT BEHAVIOR
EXPECTED BEHAVIOR
Using the same font, on a Mac, the labels look like this (as they should on Ubuntu):
DEVELOPERS ONLY SECTION
SUGGESTED CHANGE (Pseudocode optional)
none
FILES AFFECTED (where the changes will be implemented) - developers only
unknown
LEVEL OF EFFORT - developers only
major
COMMENTS
Comments (2)
-
reporter -
reporter Currently, the code is using FontMetrics.stringWidth(). It's only when Graphics2D.rotate is called on Linux where that ends up being inaccurate. Trying another method to compute the string length in pixels when the OS is linux, might be the way to go.
There is SwingUtilities.computeStringWidth() and FontMetrics.getStringBounds(). I believe that in the past, we had used getStringBounds(), but found it to be inaccurate on Mac/Windows, so I'm hoping that will work well for linux...
- Log in to comment
Seems to only affect Debian & RedHat Linux. I tried Mac & Windows and could not reproduce this there. Trying RedHat now.