On Wed, 2 Aug 2023 17:19:11 GMT, Tejesh R <[email protected]> wrote:
>> "size" label which is _RIGHT_ aligned is cut off on header cell. The issue
>> is not only w.r.t to `JFileChooser` rather it is part of `JTable`. The root
>> caused is found to be that in metal L&F the border insets is set to
>> `(2,2,2,0)` meaning the right most inset value is 0. Hence when UIScaling
>> increases the issue will be visible clearly. The fix addresses the issue by
>> setting the right `inset` to 2 similar to other `inset` values. (Though the
>> reason for setting it to 0 is unclear since it was initial load).
>> CI testing shows green.
>> After the fix at 225% scaling:
>> 
>
> Tejesh R has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Review fix
Marked as reviewed by aivanov (Reviewer).
test/jdk/javax/swing/JTableHeader/JTableHeaderLabelRightAlignTest.java line 80:
> 78: .getColumnModel()
> 79: .getColumn(0)
> 80: .getWidth() * SCALE);
Suggestion:
int x = (int)(table.getTableHeader()
.getColumnModel()
.getColumn(0)
.getWidth() * SCALE);
We already addressed [this
inconsistency](https://github.com/openjdk/jdk/pull/14766#discussion_r1279858473):
“If you add a space after the cast operator, add it everywhere; if you don't,
add it nowhere.”
In this case, I'm sure [my
suggestion](https://github.com/openjdk/jdk/pull/14464#discussion_r1282179571)
didn't have the space.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14464#pullrequestreview-1559509883
PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1282214389