RFR: 8321140: Add comment to note difference in Metal's JButton margins [v2]
Harshitha Onkar
honkar at openjdk.org
Fri Aug 16 16:47:49 UTC 2024
On Fri, 16 Aug 2024 16:16:07 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Agreed. This is what I found as well. Had a bit of trouble figuring out how to phrase the note since the comment was meant to differentiate Metal from the other default installed LAFs.
>>
>> I moved it to `BasicLookAndFeel.java` since that's where the values are specifically defined.
>
>> I moved it to `BasicLookAndFeel.java` since that's where the values are specifically defined.
>
> Perhaps, we need a note in *both files*.
>
> In `MetalLookAndFeel.java` to refer to `BasicLookAndFeel` where the margin is defined, similar to what's done for check boxes and radio button.
>
> And in `BasicLookAndFeel.java` to note that the above margins are vastly different from other L&Fs.
>
> What about this text?
>
> **`MetalLookAndFeel.java`**
>
> // default margin is (2, 14, 2, 14), defined in
> // BasicLookAndFeel via "Button.margin" UI property.
>
>
> **`BasicLookAndFeel.java`**
>
> // The above margin has vastly larger horizontal values when
> // compared to other look and feels that don't rely on these values
I agree, adding a note at both places looks clearer. The additional note in MetalLookAndFeel.java as above gives a quick lookup.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20482#discussion_r1720078073
More information about the client-libs-dev
mailing list