简体   繁体   English

主要的NSWindow阴影不像儿童窗户那样变化

[英]Main NSWindow shadow doesn't change like child windows

The primary window in my app is borderless: 我的应用程序中的主窗口是无边框的:

[self.window setStyleMask:NSBorderlessWindowMask];

From that window, I also open other child windows. 从那个窗口,我也打开其他子窗口。 When I click around between those other child windows I see the drop shadow of those child windows get darker/larger when that child window gets clicked and becomes the focused window. 当我在其他子窗口之间点击时,我看到当子窗口被点击并成为聚焦窗口时,那些子窗口的阴影变得更暗/更大。 However, my main window's shadow doesn't change when it loses or gains focus. 但是,当我失去焦点或获得焦点时,我的主窗口的阴影不会改变。 So, there isn't much user feedback to tell them that original primary window has become the focus again. 因此,没有太多用户反馈告诉他们原始主窗口已成为焦点。

Do I need to override something in my borderless window subclass to enable the shadow changes? 我是否需要覆盖无边框窗口子类中的某些内容以启用阴影更改? It has a shadow, it just doesn't get darker/larger when that window is the focus. 它有一个阴影,当窗口是焦点时它不会变得更暗/更大。

较暗的阴影是与NSTitledWindowMask绑定的行为,所以我不相信你可以使用NSBorderlessWindowMask实际获得这个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM