Why does this textured NSWindow suddenly change its background gradient when resized?

Can someone tell me why the background gradient of the textured NSWindow in this application suddenly changes when you make the window a little smaller?

bigger window, gradient 1smaller window, gradient 2

This is the smallest example I can find exhibiting this behavior. The app and source are available through Dropbox.

- Updates:

  • If you place the slider below, when resizing the gradient will not change: slider lower, small window, no gradient change

  • In addition, a change occurs when the distance between the slider and the right border of the window becomes smaller than what HIG says it should be.

+6
source share
1 answer

This is a really interesting question =)
I'm not sure, but I think this problem is related to the display of layers.

If you still want to use a textured window, you can add an additional NSView object to the interface designer between NSView and NSSlider (NSWindow → NSView → NSView → NSSlider). He corrects the error.

0
source

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


All Articles