On Sat, 11 Feb 2023 00:23:05 GMT, Damon Nguyen <dngu...@openjdk.org> wrote:
> Previous fix to HTML in AquaButtonUI fixed spacing issue for HTML images in a > JButton in Aqua L&F. The new issue comes from having text inside the HTML as > the button's text. If an icon is used, this icon exceeds the bounds of the > button and overlaps the border. > > Added additional logic to check if HTML contains an img. If so, apply the > previous fix. Otherwise, the original implementation for Aqua's JButton HTML > layout works correctly, so use this behavior. > > Added a test based on the provided test in the bug report. Automated the test > using a BufferedImage and changed the icon color to RED. Tested with multiple > runs on Aqua L&F, and the test passes with the update where it fails without > the update. This pull request has now been integrated. Changeset: 1a078714 Author: Damon Nguyen <dngu...@openjdk.org> Committer: Harshitha Onkar <hon...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/1a078714546c7582c310537dcae91b521f3c2b40 Stats: 177 lines in 2 files changed: 163 ins; 3 del; 11 mod 8302173: Button border overlaps with button icon on macOS system LaF Reviewed-by: honkar, psadhukhan ------------- PR: https://git.openjdk.org/jdk/pull/12520