为什么我的图像在我的NSTableView淡出? [英] Why are my images in my NSTableView faded out?

查看:157
本文介绍了为什么我的图像在我的NSTableView淡出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,有一个 NSArrayController (Servers),其内容是一个服务器对象的数组。

To start, there's an NSArrayController ("Servers") whose content is an array of "server" objects.

我也有一个 NSTableView 和一个列。该列绑定到服务器的arrangedObjects.status属性。

I also have an NSTableView with a column. The column is bound to Server's "arrangedObjects.status" property.

我使用自定义 NSValueConverter 成为列的 dataCell 的图像,该列是 NSImageCell

I use a custom NSValueConverter to make that status into an image for the column's dataCell which is an NSImageCell.

我不明白的是为什么在列中显示的图像是正确的,但是一直淡出。只是为了测试,我有相同的图像在表视图之外进行比较,它绘制精细。图片中的颜色不是半透明的。

What I don't understand is why the images that show up in the column are correct, but consistently faded out. Just to test, I have the same image outside the table view for comparison and it draws fine. The colors in the images are not semi-transparent.

NSImageCell 是否将图片绘制为褪色?

Does the NSImageCell draw the images as faded? Is there something I can configure in IB that will draw them fully saturated?

推荐答案

来自Jim Correia的Cocoa-Dev:

From Jim Correia on Cocoa-Dev:

在10.6中,NSImageView将在禁用控件时将其内容绘制为灰色。

"On 10.6, NSImageView will draw its content as dimmed when the control is disabled.

设置已启用已打开。

这篇关于为什么我的图像在我的NSTableView淡出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆