RFR: 8321140: Add comment to note difference in Metal's JButton margins [v3]
Damon Nguyen
dnguyen at openjdk.org
Fri Aug 16 18:56:25 UTC 2024
On Fri, 16 Aug 2024 16:44:17 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>>> 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.
That does sound best. Added the notes to both areas as suggested. I still don't know how to not make the note in `MetalLookAndFeel.java` not feel like it's hanging, but I added the note to the same spot again. I think it's the most logical area.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20482#discussion_r1720213468
More information about the client-libs-dev
mailing list