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

Alexey Ivanov aivanov at openjdk.org
Tue Aug 1 13:49:07 UTC 2023


On Tue, 1 Aug 2023 13:35:09 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:
>> ![image](https://github.com/openjdk/jdk/assets/94159358/f3e5a88a-1710-4ee0-84aa-338bc93010b2)
>
> Tejesh R has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
> 
>  - Review fix
>  - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_8301606
>  - Review fix
>  - Review fix
>  - Review fix
>  - Review fix
>  - Spacing fix
>  - Automated test added
>  - Removed white space
>  - Fix + Manual Test

test/jdk/javax/swing/JTableHeader/JTableHeaderLabelRightAlignTest.java line 98:

> 96:     }
> 97: 
> 98:     private static void saveBufferedImage(BufferedImage image, String fileName) {

`saveImage` should be enough as in #14766?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1280672097



More information about the client-libs-dev mailing list