On Wed, 3 Feb 2021 23:52:24 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> Alexander Zuev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Test simplification. > > src/java.desktop/macosx/classes/com/apple/laf/AquaButtonLabeledUI.java line > 178: > >> 176: } >> 177: >> 178: altIcon.paintIcon(c, g, iconRect.x - offset, iconRect.y - >> offset); > > Is it possible that due to offset on the left/top we will draw the icon > outside the button bounds on the right/bottom? No. I am substracting the offset to keep drawn image inside the checkbox/radiobutton icon drawing box which is by default size of the icon+4 in width and height, hence i am shifting it up and left to avoid drawing outside the icon box. If size of the image button is artificially limited to the value less or equal of the icon size then halo will be clipped to stay within the borders of the component. In any case we will not overdraw outside of the component. ------------- PR: https://git.openjdk.java.net/jdk/pull/2384