RFR: 8301606: JFileChooser file chooser details view "size" label cut off in Metal Look&Feel

Alexey Ivanov aivanov at openjdk.org
Wed Jun 21 20:57:02 UTC 2023


On Wed, 21 Jun 2023 03:25:26 GMT, Tejesh R <tr at openjdk.org> wrote:

> Since the border is moved to left slightly (maybe 1pixel), so we are seeing that the string is "cut off". I guess if we work on correcting the JTableMetal Border along with adding a margin space (Right), the issue will be fixed? (Screen shot added - Maybe have to zoom-in to see the difference in border w.r.t data cell border)

It's very likely the reason why. We saw that borders may render inconsistently: 1-, 2- or 3-pixel lines (for 225%).

I zoomed in your screenshot. The 100%-scale case has 1-pixel shadow and 1-pixel highlight. It seems the text is cut off by 1 pixel, the black pixels of ‘e’ are at the very edge of the shadow pixels. I'd expect to see blue-ish pixels of text antialiasing to the right of the black text pixels.

In 225%-scale case, the first separator looks better. It consists of 2-pixel shadow, 1-pixel background, 1-pixel highlight for the next header. On the background-colored pixel, I see pixels of text, blue-ish pixels of antialiasing. So the position of the text is still a bit off. It's no wonder if you take into account that it's 1-pixel off even for 100% case.

The second separator has more issues: 2-pixel shadow, 2-pixel background, 1-pixel highlight. There should be no background pixels between the shadow and highlight but there are… It's an inherent problem of scaled graphics. That background pixels also have parts of the text, 2 pixels.

In short, it seems there's still a text positioning issue… as if it doesn't account for antialiasing.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14464#issuecomment-1601660246



More information about the client-libs-dev mailing list