On Wed, 2 Feb 2022 07:44:31 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
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?

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

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

Reply via email to