On Tue, 20 Jun 2023 20:33:32 GMT, Phil Race <[email protected]> wrote:
> > > This change will have broad impact everywhere the Border is used. And it > > > seems to me to be a workaround for the problem that Metal isn't correctly > > > calculating the length of the text at the scaled resolution. > > > > > > It is possible that the width of the sting isn't calculated correctly, > > which could explain “cut off” label. At the same time, the text flushed to > > the very edge doesn't look either. When there's a margin, text looks better > > and is easier to read. Perhaps, we should address both issues. > > So long as such a margin doesn't just become another workaround fix, so > > Step 1 - measure it correctly Step 2 - add a pixel of clear margin space for > added aesthetics. I have been spending some time in analyzing the String width and position, they seems to be fine. And what I have observed is the border of JTableHeader seems to be having an offset (from 100% to 225%), i.e., it is varying w.r.t scaling, maybe a rounding factor too. 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) <img width="554" alt="JTableSizeHeaderScalingComparision" src="https://github.com/openjdk/jdk/assets/94159358/f683bf9a-6b4a-4249-b8ec-41e0925c057d"> ------------- PR Comment: https://git.openjdk.org/jdk/pull/14464#issuecomment-1600017858
