> Html does not fit in JButton at certain sizes because default Insets cause 
> html to be displayed off-center. 
> 
> Changes made to SwingUtilities.java layoutCompoundLabelImpl method to enable 
> clipping if html does not fit, similar to regular text. AquaButtonUI.java now 
> detects when html does not fit, and an implementation for alternate insets 
> that are recursively tested for regular text inside layoutAndGetText() are 
> now also being used for html content.
> 
> Created test (Bug8015854.java) with the same format as the test described on 
> the issue. The button is of size 37x37 with an image of a red square sized 
> 19x19. The test checks for red pixels on the edges of where the square image 
> should be from the center of the button. The test fails with the non-changed 
> jdk, but passes with the changes.

DamonGuy has updated the pull request incrementally with one additional commit 
since the last revision:

  Updated fix for Aqua instead of SwingUtilities. Updated copyright. Moved 
generate image out of EDT. Changed to only test on MacOS Aqua LAF. Changed file 
location for generated image. Exit test with IOException on failed image 
generation.

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7310/files
  - new: https://git.openjdk.java.net/jdk/pull/7310/files/9a3c223c..129fc0b9

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7310&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7310&range=01-02

  Stats: 96 lines in 3 files changed: 24 ins; 45 del; 27 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7310.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7310/head:pull/7310

PR: https://git.openjdk.java.net/jdk/pull/7310

Reply via email to