【发布时间】:2018-12-11 19:33:11
【问题描述】:
我有一个自定义的 NSButton,但无论我做什么,禁用的颜色总是灰色
我尝试了所有遇到的解决方案
我正在用白色前景色设置属性字符串标题(我看起来颜色属性在禁用状态下被忽略了)
我确实设置了 [[self cell] setImageDimsWhenDisabled:NO];
文档状态时的事件
// When disabled, the image and text of an NSButtonCell are normally dimmed with gray.
// Radio buttons and switches use (imageDimsWhenDisabled == NO) so only their text is dimmed.
@property BOOL imageDimsWhenDisabled;
没用
我的 NSButton 使用 WantUpdateLayer YES,所以绘制方法被覆盖了,但是我不明白,标题是在哪里绘制的
【问题讨论】: