NSWindow纹理背景与NStextField [英] NSWindow textured background with NStextField

查看:176
本文介绍了NSWindow纹理背景与NStextField的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个超奇怪的问题。我想要一个纹理窗口有正常的渐变颜色。我在这个窗口中有一个NSTextField,文本字段注定是一个URL输入字段,因此它需要是大的。问题是,当它太大(大约超过1/3的窗口宽度),它只是切换纹理的窗口,以绘制一个更深的版本的渐变。

I have a super strange problem. I want a Textured window to have it normal gradient color. I have an NSTextField in this window, the text field is destined to be an URL input field so it need to be large. The problem is that when it is too large (approximately more than 1/3 of the window width) it just switch the textured window to draw a darker version of it gradient.

这里是一个示例项目(非常简单...)供您测试。

Here is an example project (very simple...) for you to test.

http://raven.ipodtutofast.com/ test.zip

当你构建和运行它注意到窗口的背景,初始一个是好的,现在使窗口更大,它会切换到更暗的背景。

When you will build and run it notice the background of the window, initial one is fine, now make the window bigger, it will switch to a darker background.

我真的不知道如何解决这个问题。

I really don't have any idea on how to fix this.

更新:感谢cocoahero,如果在IB的内容边框设置中选择自定义,你可以设置渐变高度为任何你想要的,从来没有注意到之前。 / p>

Update: Thanks to cocoahero, if in the content border setting in IB you choose custom you can just set the gradient height to whatever you want, never noticed that before.

推荐答案

它似乎与窗口内容边框设置相关。当在IB中将其设置为none时,不会发生问题,但也会修改渐变。似乎像一个bug给我。也许是雷达的时间?

It appears to be related to the windows "content border" setting. When it is set to none in IB, the problem doesn't occur, but also modifies the gradient. Seems like a bug to me. Perhaps time for a radar?

这篇关于NSWindow纹理背景与NStextField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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