RFR: 8015854: [macosx] JButton's HTML ImageView adding unwanted padding
Alexey Ivanov
aivanov at openjdk.java.net
Tue Mar 1 14:30:06 UTC 2022
On Thu, 3 Feb 2022 01:43:07 GMT, DamonGuy <duke at openjdk.java.net> wrote:
> > The JBS says "This is reproducible with the Mac default (Aqua) look and feel; using another LAF (Metal for instance) seems to position the ImageView correctly." so it seems to be a mac issue not generic, so fixing in shared code will have other repurcussions..You probably need to fix in Aqua specific class..
>
> @prsadhuk Sorry, I forgot to mention in the JBS issue that while testing if the issue was reproducible locally, I discovered that the issue exists for Aqua LAF as described, but also other LAFs (such as Metal and Basic).
>
> This discovery shifted my attention away from AquaButtonUI alone, and AquaButtonUI's layoutAndGetText method using alternative insets turned out to be where the issue was coming from. This method relies on "SwingUtilities.layoutCompoundLabel" to generate alternative insets, so that's where I made my changes. Is this logic valid or should I contain my changes in AquaButtonUI?
Since this fix addresses `AquaButtonUI` only and we know for sure that other Look-and-Feels are also affected (Metal at least according to the comments in JBS and here), has anyone submitted a new bug for other LaFs?
-------------
PR: https://git.openjdk.java.net/jdk/pull/7310
More information about the client-libs-dev
mailing list