如何在 Mac 屏幕顶部获取图标
在我的 Mac 的最顶部,有一个栏,其中显示了我的电池百分比、日期和时间、音量等。还有一个 dropbox 文件夹。我怎样才能创造出一些可以扔到那里的东西呢?我想在该菜单栏中放置一些快捷方式。有办法做到吗?
On the very top of my Mac, there is a bar which has my battery percentage, the date and time, the volume, etc. There is also a dropbox folder. How can I create something that gets thrown up there? I'd like to put a few shortcuts in that menu bar. Is there a way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该栏相当于 Windows 上的系统通知栏。您希望将快捷方式放置在扩展坞上(通常位于屏幕底部)。您可以通过拖放来完成此操作。
来自 Wikipedia
但是,如果您决定将快捷方式放在栏上,这里是 如何创建菜单附加内容
或者,已经为此目的创建了一些免费应用程序。 HimmelBar - 免费,XMenu - 免费,以及 MoofMenu - 5 美元
That bar is the equivalent to the system notification bar on Windows. You want to place your shortcuts on the dock (normally located at the bottom of your screen). You do this by drag and dropping.
From Wikipedia
However, if you are determined to put your shortcuts on the bar, here is how to create menu extras
Alternatively, there are some free apps already created for this purpose. HimmelBar - Free, XMenu - Free, and MoofMenu - $5
您想要使用
NSStatusBarItem
类(另请参阅代表菜单栏本身的NSStatusBar
类。)请注意,使用此 API 创建的图标/菜单不会“混合和匹配” ” 与操作系统提供的那些,而是与它们的左侧对齐,并且不能由用户拖动。尽管如此,它对于大多数用途来说已经足够了。
You want to use the
NSStatusBarItem
class (see also theNSStatusBar
class which represents the menu bar itself.)Note that icons/menus created with this API do not "mix and match" with the OS-provided ones, but rather are aligned to the left of them and cannot be dragged by the user. Still, it's good enough for most uses.