RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding [v2]

DamonGuy duke at openjdk.java.net
Mon Feb 7 17:35:09 UTC 2022


On Sat, 5 Feb 2022 18:16:34 GMT, Phil Race <prr at openjdk.org> wrote:

>> DamonGuy has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Add cycling of all installed LAFs. Add image generation to avoid saving an image to repo.
>>  - Changed frame to dispose regardless of passing or failing.
>
> src/java.desktop/share/classes/javax/swing/SwingUtilities.java line 1129:
> 
>> 1127:             v = (c != null) ? (View) c.getClientProperty("html") : null;
>> 1128:             if (v != null) {
>> 1129:                 if(availTextWidth < (int) v.getPreferredSpan(View.X_AXIS)){
> 
> Can you attach "before" and "after" images into the bug report as part of the evaluation ?
> Do this for Aqua and Metal too.
> 
> I presume this code only gets entered for labels with images ?
> If this is all L&Fs then please manually test on mac. Windows and GTK L&Fs using SwingSet2 looking for problems as well as running all automated client tests using mach5.
> 
> We do not use syntax like "if(" and "else{".
> It should always be "if (" and "else {"
> Also no space after (int) for the cast. lines 1129 and 1134 .. 
> And make sure lines are <=80 characters long which that one 1134 doesn't look to be.

Images will be attached.

This code runs for html images as well as html text. I found that the extra padding issue exists for anything bound by the <html> tags. 

Syntax has been fixed locally and will appear in next commit.

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

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



More information about the client-libs-dev mailing list