如何更改NSWindow标题栏的高度? [英] How to change the height of an NSWindow titlebar?

查看:1770
本文介绍了如何更改NSWindow标题栏的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要更改NSWindow标题栏的高度。

I want to change the height of an NSWindow titlebar.

以下是一些示例:

Here are some examples:

和...

我可以使用NSToolbar,但问题是我不能放置视图非常高(例如:我不能放置segmentedControl高于图片,因为仍然有标题栏)

I could use an NSToolbar, but the problem is that I can't place views very height (For example: I can't place the segmentedControl higher than in the picture because there is still the titlebar)

如果我删除标题栏,我不能放置NSToolbar,窗口不可移动。

If I remove the titlebar I can't place a NSToolbar and the window isn't movable.

您有任何想法吗?

推荐答案

INAppStoreWindow是一个NSWindow子类,它会告诉您如何更改标题栏的高度。

INAppStoreWindow is a NSWindow subclass, it tell you how to change the height of title bar.

https:// github.com/indragiek/INAppStoreWindow

http://iloveco.de/adding-a-titlebar-accessory-view-to-a-window/

此示例告诉您如何添加按钮在标题栏中。

http://iloveco.de/adding-a-titlebar-accessory-view-to-a-window/
This example tells you how to add buttons in the title bar.

这篇关于如何更改NSWindow标题栏的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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