RFR: 8302173: Button border overlaps with button icon on macOS system LaF [v3]
Damon Nguyen
dnguyen at openjdk.org
Tue Feb 14 23:02:17 UTC 2023
On Tue, 14 Feb 2023 22:08:26 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> Yes, I tested with these combinations:
>> Icon with HTML image
>> <img width="274" alt="Screen Shot 2023-02-14 at 12 30 23 PM" src="https://user-images.githubusercontent.com/96267980/218855067-68186106-77df-4c2b-81d7-2cd24e28f4bb.png">
>>
>> Icon with HTML text
>> <img width="270" alt="Screen Shot 2023-02-14 at 1 10 28 PM" src="https://user-images.githubusercontent.com/96267980/218863780-de2293ea-9da6-4db9-9201-4788b7567478.png">
>>
>> And the `HtmlButtonImageTest` still passes as expected
>
> Looks good.
>
> I might have missed it earlier, adding an instanceof check makes it safer before calling getIcon(). What do you think?
> `if (v != null && c instanceof AbstractButton && ((AbstractButton) c).getIcon() == null)){`
Implemented your suggestion. I agree, it's more stable this way.
-------------
PR: https://git.openjdk.org/jdk/pull/12520
More information about the client-libs-dev
mailing list