NSButton Image Image Size

I am trying to add an image to NSButton. No matter what sizes I make, the image is cropped (see. Button on the left in the screenshot). It is simple NSRoundedBezelStyle NSButton. In this case, my image is 15x15, and the button has a height of 26 and a width of 45.

What is the correct way to create and add an image in NSButtonso that it displays correctly?

Thank!

enter image description here

+4
source share

Source: https://habr.com/ru/post/1531422/


All Articles