Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big Sur style toolbar icons #1214

Merged
merged 1 commit into from
Sep 18, 2022
Merged

Big Sur style toolbar icons #1214

merged 1 commit into from
Sep 18, 2022

Conversation

sfsam
Copy link
Contributor

@sfsam sfsam commented Oct 6, 2021

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 ychin added the UI Issues related to UI elements, tabs, scrollbars, window resizing, etc. label Oct 7, 2021
@ychin
Copy link
Member

ychin commented Oct 7, 2021

@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
Copy link
Contributor Author

sfsam commented Oct 8, 2021

@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
Copy link
Contributor

eirnym commented Oct 9, 2021

May I ask to add an explicit license for them?

@sfsam
Copy link
Contributor Author

sfsam commented Oct 10, 2021

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

@jspiro
Copy link

jspiro commented Dec 15, 2021

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
Copy link

jspiro commented Dec 15, 2021

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

@ychin ychin merged commit 951e80d into macvim-dev:master Sep 18, 2022
@ychin
Copy link
Member

ychin commented Sep 18, 2022

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.

@ychin ychin added this to the Release 175 milestone Sep 18, 2022
ychin added a commit to ychin/macvim that referenced this pull request Oct 30, 2022
Can now specify SF Symbols for tool bar / Touch Bar icons. The API
remains the same where we use the "icon=" syntax in Vim menus to specify
the icon, and just passing in the symbol name (e.g. 'gear.circle'). Also
extended this to system named images like 'NSAdvanced' (the old gear
shaped image), as previously we only had a specical case for Touch Bar
system named template images. When loading the icon, MacVim will
automatically determine whether it's an SF Symbol, system named image,
or a file.

SF Symbols can also be customized to be of a particular symbol style, or
have a variable number set, by using colon-delimted option strings. For
example: `aqi.high:palette:variable-0.5` is a symbol that uses the
palette style, set to 0.5 variable value.

Menu items now also support icons, the same as tool bars. We still don't
support specifying icons for a submenu (which has been an issue for
Touch Bar) since the Vim menu API doesn't support a way to do so.

Also add an ability to use a `:template` value to specify that an image
file is a template image. This is important to fix a minor regression
introduced in macvim-dev#1214 where every image loaded in were assumed to be
template.

Add documentation to make this clear. See `:help macvim-toolbar-icon`.

Also see comment in macvim-dev#1105 which requested this feature
ychin added a commit that referenced this pull request Feb 7, 2023
Updated to Vim 9.0.1276

Features
====================

Dictionary lookup
--------------------

You can now use Force Touch or Cmd-Ctrl-D to look up definitions of word
under the cursor (or selected text in visual mode). This will also
preview URLs, and support data types such as phone numbers and
addresses. #1312 #1313

This feature can also be invoked programmatically from VimScript (see
`:h macvim-lookup`). #1315

Tool bar / Touch Bar / menu icons
--------------------

You can now use SF Symbols for Tool bar and Touch Bar icons, including
using different symbol styles such as "palette" or "multicolor". Menu
items can now also use the `icon=` syntax to specify icons as well. See
`:help macvim-toolbar-icon` for details. #1329

The default tool bar also has updated icons to look similar to SF
Symbols used by newer macOS versions. #1214 by @sfsam

Window management actions
--------------------

There are new `macaction`'s for managing the MacVim window. The new
`zoomLeft`/`zoomRight` actions allow you to pin the window to the
left/right of the screen, and there are also new actions for interacting
with Stage Manager (requires macOS 13+). See `:h macvim-actions` for
details. #1330

Pre-release updates / Sparkle 2
--------------------

MacVim now supports pre-release software builds. It's sometimes hard for
us to release frequent updates due to the desire to pick a stable
upstream Vim version, needing to test the release on multiple OS
versions, making sure there aren't half-complete or buggy features, and
other reasons.

This new feature now allows us to push pre-release beta builds out in a
more frequent fashion, which could be useful if there are particular
features or fixes that you would like to try out before the next
official release. Pre-release builds will be released depending on bug
fixes and features instead of a fixed cadence. Do note that these
pre-release builds may not be as well-validated and may have half-baked
features.

If you are using the built-in auto-updater to update MacVim, you can
turn this on by going to Advanced settings pane, and enable "Enable
pre-release software updates".

This feature is only available for macOS 10.13 or above.

The auto-updater has also been updated from Sparkle 1.27.1 to 2.3.0 for
10.13+ builds. Legacy (10.9-10.12) builds are still using Sparkle 1.

See #1332.

New Vim features
--------------------

New `smoothscroll` option allows you to scroll through a long wrapped
line (using Ctrl-E or mouse wheel) without immediately jumping to the
next line. (v9.0.0640)

`splitscroll` option has been renamed `splitkeep`, with more flexibility
than before. (v9.0.0647)

Sound playback on macOS is now supported. You can use `has('sound')` to
check. See `help sound` for details. (v9.0.0694)

Terminals now support `:confirm` for `:q`, etc, which also means
MacVim's Cmd-W will work properly for terminal windows. (v9.0.0710)

Virtual text had numerous bugs fixed.

General
====================

Legacy build for 10.9 - 10.12
--------------------

Per a previous announcement (#1271), the default MacVim binary will now
require macOS 10.13 or above. Users of macOS 10.9 - 10.12 can use a
separate "legacy" build which will still be supported. The legacy binary
will still have the latest versions of Vim and be supported, but may not
have all the latest features (e.g. pre-release builds).

If you are using the auto-updater (Sparkle) to update MacVim, it should
"just work" and find the best version for you. If you are downloading
MacVim from the website, there is also a link to download the legacy
version marked for 10.9+ as well. If you download the normal binary
marked for 10.13+ from the website, it won't work on these older macOS
versions.

See #1331.

Fixes
====================

CoreText Renderer clipping and rendering bugs
--------------------

Unicode characters with multiple composing characters (e.g. "x⃗") will
now render correctly. #1172

Texts (e.g. Tibetan, Zalgo texts) that are taller than the line height
will no longer be clipped inappropriately. You can use a new setting
`MMRendererClipToRow` to re-enable clipping if the tall texts are
distracting. #995 / #1356

Tab crash
--------------------

Fixed a crash when opening new tabs that seems to only occur in macOS 13
Ventura. #1333

Other bugs
--------------------

- Fixed non-native full screen not working well with the notch on newer
  MacBook's when set to not show menu bar. You can also use
  `MMNonNativeFullScreenSafeAreaBehavior` to force MacVim to use the
  notch area as well if you don't mind some content being obscured. Note
  that the previous release also claimed it fixed this, but because the
  binary was built against an old macOS SDK (Big Sur), the fix did not
  work in the binary release. #1261
- Allow "Open untitled window: never" and "After last window closes:
  Quit MacVim" to be set together again. Added safeguards to make sure
  doing so won't immediately close the app. #1338
- Edit.Cut / Copy menu items will now be properly disabled when there
  isn't selected text. #1308
- Fixed potential `:emenu` crash when the menu is associated with an
  action in a non-valid mode. #1305
- Fixed bug where just bringing up the right-click (or the
  MacVim→Services) menu would somehow copy the selected texts to the
  system clipboard. #1300
- Fixed a Japanese input method bug where using left/right arrow to move
  to a different section of the input text would previously result in
  the candidate list not showing up at the correct position. #1312
- Fix non-CoreText renderer not handling text styles like strikethrough
  correctly (note: this renderer has been deprecated for a while and you
  should not use it). #1296
- This release uses an older sh/bash syntax file because the latest one
  in Vim has a bug. #1358

Misc
====================

New settings:

- "No drop shadows" (Appearance). #1301
- "Treat Ctrl-click as right-click" (Input) (#1326). This was previously
  configurable via command-line, but now also possible in the settings
  pane under the new "Input" category.

"About MacVim" now reports the version number in a clearer way with
clearly specified release number vs Vim version.

Known Issues
====================

Printing
--------------------

Printing using File→Print or `:hardcopy` is currently not working under
macOS 13 Ventura due to its removal of PostScript support in the Preview
app. This will be fixed in a later release. See the issue for
workarounds. #1347

Scripting
====================

- Scripting languages versions:
    - Perl is now built against 5.30, up from 5.18.
    - Ruby is now built against 3.2, up from 3.1.

Compatibility
====================

Requires macOS 10.9 or above. (10.9 - 10.12 requires downloading a
separate legacy build)

Script interfaces have compatibility with these versions:

- Lua 5.4
- Perl 5.30
- Python2 2.7
- Python3 3.10
- Ruby 3.2
@sfsam sfsam deleted the toolbar branch August 25, 2024 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to UI elements, tabs, scrollbars, window resizing, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants