macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.53k stars 685 forks source link

Big Sur style toolbar icons #1214

Closed sfsam closed 2 years ago

sfsam commented 3 years ago

Updated the toolbar icons. They are template images now in order to work with light and dark mode.

macOS 10 vim10-light vim10-dark

macOS 11 vim11-light vim11-dark

ychin commented 3 years ago

@sfsam where did these icons come from? Did you generate these or rendered them from SF Symbols? Some of them at least look like they are from SF Symbols.

I think ideally, we just directly load the SF Symbols, and use png's for backup on older OS versions. I'm also not sure if we are allowed to distribute SF Symbols so probably will have to use the old pngs.

sfsam commented 3 years ago

@ychin They are based on SF Symbols. For example, there is no 'open folder' SF Symbol but if there were, it might look like this one. There is a clipboard SF Symbol, but it doesn't have a proper clip on top like this one. And many that look like SF Symbols are still different: SF Symbols have uniform line widths whereas these have thicker borders and thinner internal lines as well as some different shading to add some dimensionality. Finally, some of these have no SF Symbol analog.

The current icons are over a decade old, use some anachronistic symbols (floppy disks), and are low resolution. This seemed like an easy way to update a minor corner of the app that hasn't been touched in a while.

I don't see an advantage to using SF Symbols when just dropping new PNGs works as well, is automatically backward compatible, and requires no new code nor a dependency on a still-evolving Apple technology. Even if you want to use SF Symbols, you can always do that later. This is simply new PNGs and a line of code to draw them as template images.

eirnym commented 3 years ago

May I ask to add an explicit license for them?

sfsam commented 3 years ago

@eirnym I'm sorry, which license do you mean?

jspiro commented 2 years ago

If you need a symbol that SF Symbols doesn’t provide, you can create your own. To create a custom symbol, first export a symbol that’s similar to the design you want, then use a vector-editing tool like Sketch or Illustrator to modify it. Use the result in your app as you would use the original symbol file.

https://developer.apple.com/design/human-interface-guidelines/sf-symbols/overview/

Availability of individual symbols and features varies based on the version of the system you’re targeting. For example, when you export a new symbol from SF Symbols 3 as an SVG template and bundle it with your app, you can use it in apps that target iOS 13, Mac Catalyst 13, tvOS 13, or watchOS 6, but without the benefit of SF Symbol 3 features like Hierarchical or Palette color rendering.

They encourage remixing of their symbols, the app itself exports symbols as SVG. Apple's dev docs note for older OSes that you can use PNG, or SVG in newer OSes. Their docs also reference adding these remixes into your resources. They do not explicitly say it must be SVG when remixed, nor do they say it may explicitly be any other format. They just use SVG in their docs as a fact and leave it there.

This is ALL I can find on licenses:

You may not use SF Symbols — or glyphs that are substantially or confusingly similar — in your app icons, logos, or any other trademark-related use. Apple reserves the right to review and, in its sole discretion, require modification or discontinuance of use of any Symbol used in violation of the foregoing restrictions, and you agree to promptly comply with any such request.

So I think we're okay to redistribute as PNG for backwards-compatibility, and we're okay to remix, as long as we don't use it in logos, etc.

jspiro commented 2 years ago

Screenshot 2021-12-14 at 5 35 02 PM And for reference, today's images.

ychin commented 2 years ago

Ok I finally got around to merging this. Sorry for the delay! Thanks for doing the work @sfsam. And yes the existing icons were pretty bad and don't match at all with the rest of the software / OS.

One thing I'm concerned with is that you now make all images templated, meaning they are just grayscale masks. This works well for the ones that you have submitted, but people can use their own bitmaps too and now they will be in for a surprise. I didn't want to delay merging this but I'll probably add some code to only do that for the built-in tool bar icons.

I'm working on a separate PR to allow specifying SF Symbols for tool bar and touch bar, so that should come in soon as well. I'll probably try to fix the templating issue there. Also, now that this is merged I don't see a reason to replace your icons with the SF Symbols ones, unless Apple drastically changes things up again and introduce their next "best symbols ever" that requires everyone to change their UI again. One thing that the new SF Symbol configuration PR I'm working on has is that it allows you to do something like menu icon=pencil.line:palette ToolBar.Test <Nop> to get the "palette" version of the symbol. I'll think about whether I want something like that for regular images as well where you can say "image.png:template" to specify that it's a templated image. But then I feel like this is kind of niche use case.