RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v4]
DamonGuy
duke at openjdk.java.net
Tue May 10 19:03:23 UTC 2022
> The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text.
>
> The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device.
DamonGuy has updated the pull request incrementally with one additional commit since the last revision:
Added string buffer. Separated fail images. Changed exception to throw at the end of test.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/8407/files
- new: https://git.openjdk.java.net/jdk/pull/8407/files/cc5091fa..82d9ca27
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8407&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8407&range=02-03
Stats: 18 lines in 1 file changed: 15 ins; 0 del; 3 mod
Patch: https://git.openjdk.java.net/jdk/pull/8407.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/8407/head:pull/8407
PR: https://git.openjdk.java.net/jdk/pull/8407
More information about the client-libs-dev
mailing list