OS X图标大小 [英] OS X icons size

查看:153
本文介绍了OS X图标大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OS X的应用程序图标和菜单栏图标的大小应该是多少?

What size should an application icon and menu bar icon for OS X be?

我可以处理小型分辨率显示器,但是Retina - 菜单栏上显示的图标(例如20 x 20)在新MacBook上会更小或模糊Pro与视网膜显示?
我估计应用程序图标将缩放,所以如果我准备两倍大于常规,应该在Retina上确定。

I can deal with small resolution displays but what about Retina - does an icon displayed on the menu bar (e.g. 20 x 20 ) will be smaller or blurred on a new MacBook Pro with Retina display? I reckon that the Application icon will be scaled, so if I'll prepare twice larger than regular it should be OK on Retina.

我发现了一个很好的

推荐答案

NSStatusBar图标(即菜单酒吧图标)不同于常规的应用程序图标。我没有找到一个NSStatusBar官方图标指南,但我不得不相信按钮的工具栏图标指南非常接近。建议:

NSStatusBar icons (i.e. Menu bar icons) are different from regular app icons. I have not been able to find an NSStatusBar official icon guideline, but I have to believe that the Toolbar Icon guideline for buttons is pretty close. It suggests:


  • 创建测量不超过19x19像素的图标。


  • 使用黑色(根据需要添加透明度以建议
    维度)。
  • / li>
  • 使用抗锯齿。

  • 使用PDF格式。

  • 在视觉上居中在控件中(注意,视觉上
    居中可能不是以数学中心为中心)。

  • Create icons that measure no more than 19x19 pixels.
  • Make the outline sharp and clear.
  • Use a straight-on perspective.
  • Use black (add transparency only as necessary to suggest dimensionality).
  • Use anti-aliasing.
  • Use the PDF format.
  • Make sure the image is visually centered in the control (note that visually centered might not be the same as mathematically centered).

,我发现:


  1. NSStatusBar似乎看起来最好的高度为18像素或更少。 systemStatusBar的厚度为22

  2. 虽然列出了PDF格式,但我一直在使用png。

  3. 如果你想让你的图标为蓝色,您需要将alternateImage作为图标的单独白色版本提供。

代码示例:

myStatusItem = [[NSStatusBar systemStatusBar]statusItemWithLength:NSSquareStatusItemLength];
NSImage *statusImage = [NSImage imageNamed:@"Status.png"];
[myStatusItem setImage:statusImage];
NSImage *altStatusImage = [NSImage imageNamed:@"StatusHighlighted"];
[myStatusItem setAlternateImage:altStatusImage];
[myStatusItem setHighlightMode:YES];
[myStatusItem setMenu:self.myStatusMenu];

这篇关于OS X图标大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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