On Thu, 24 Feb 2022 09:21:29 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> DamonGuy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed incomplete comment. > > src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java line 313: > >> 311: // use zero insets for view since layout only handles text >> calculations >> 312: text = layoutAndGetText(g, b, aquaBorder, new >> 313: Insets(0,0,0,0), viewRect, iconRect, textRect); > > If there is only html text instead of image in JButton, will it not be a > problem using 0 insets or is there a problem with text too being shifted like > image? The text was also unexpectedly shifted, so this zero inset fixes that issue as well. Setting the insets to zero for all HTML fixes the unwanted padding. ------------- PR: https://git.openjdk.java.net/jdk/pull/7310