开发者

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

开发者 https://www.devze.com 2023-04-11 12:53 出处:网络
Can someone please tell me, why the background gradient of the textured NSWindow in this app suddenly changes, when you make the window a little bit 开发者_高级运维smaller?

Can someone please tell me, why the background gradient of the textured NSWindow in this app suddenly changes, when you make the window a little bit 开发者_高级运维smaller?

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

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

This is the minimal example I could find, that exhibits this behaviour. App & Source are available via Dropbox.

-- Updates:

  1. If you put the slider lower,the gradient does not change when resizing the window:

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

  2. Also, the change seems to happen when the distance between the slider and the window's right border gets smaller than the HIG says it should be.


It is really interesting question =)
I don't shure, but guess, this problem is connected to layers displaying.

If you still want to use textured window, you can put additional NSView object in the interface builder between NSView and NSSlider (NSWindow -> NSView -> NSView -> NSSlider). It fixes the bug.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号