RFR: 8301606: JFileChooser file chooser details view "size" label cut off in Metal Look&Feel [v9]
Alexey Ivanov
aivanov at openjdk.org
Wed Aug 2 11:57:55 UTC 2023
On Wed, 2 Aug 2023 09:01:32 GMT, Tejesh R <tr at openjdk.org> 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
I still prefer the previous version where the exception was thrown directly.
In fact, you don't create real UI, the test doesn't depend on processing events — the entire test can be run on main thread *safely*. Get rid of `invokeAndWait` altogether?
test/jdk/javax/swing/JTableHeader/JTableHeaderLabelRightAlignTest.java line 57:
> 55: if (!testStatus) {
> 56: throw new RuntimeException(failureMsg);
> 57: }
Suggestion:
if (failureMsg != null) {
throw new RuntimeException(failureMsg);
}
`testStatus` is redudant.
-------------
Changes requested by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/14464#pullrequestreview-1558834675
PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1281796325
More information about the client-libs-dev
mailing list