GorvGoyl / Shortcut-Menu-Bar-VSCode-Extension

Add handy buttons like beautify, show opened files, save, toggle terminal, etc to the editor menu bar in VSCode. You can also create your own buttons with custom commands. VSCode Marketplace link: https://marketplace.visualstudio.com/items?itemName=jerrygoyal.shortcut-menu-bar
https://marketplace.visualstudio.com/items?itemName=jerrygoyal.shortcut-menu-bar
GNU General Public License v3.0
221 stars 44 forks source link

Broken SVG Icon/Buttons on Latest Version of VS Code (v.1.56) #54

Closed SolarTheory closed 2 years ago

SolarTheory commented 3 years ago

The latest version of VS Code (v.1.56.0) seems to have broken the Shortcut Menu Bar icons / buttons. Upon reverting to a previous version of VS code, the issue went away. Not sure if this is something that you need to fix on your end or if it's a VS Code bug, but I thought you should be aware:

SMB-Broken-Icons-Light-Theme-VSCv1 56 SMB-Broken-Icons-Dark-Theme-VSCv1 56

VS Code Version: VS Code Version 1 56 0

GorvGoyl commented 3 years ago

thanks for informing, yes, it seems to be an issue from VSCode side. I've added the bug report https://github.com/microsoft/vscode/issues/123118. Request others to please vote there for visibility.

dulkith commented 3 years ago

same issue

RudraAsthana commented 3 years ago

Then working with an old version might be the fix?

GorvGoyl commented 3 years ago

yes for now, vscode will release a new update soon

SolarTheory commented 3 years ago

The problem is that the svg icons are 512x512, which is not in conformity with VS Code's "official" spec. The official documentation specifies icon sizes of 16x16. For whatever reason this official spec was never enforced. The new VS Code release inadvertently enforces it.

Long story short, due to complaints, Microsoft will be releasing a fix. I have both VS Code stable and Insiders installed on my system, and it has been fixed in the latest version of VS Code Insiders.

It may not be coming to the stable release immediately though. Perhaps next month? Not sure.

If you want immediate fix, resize the SVG icons you use to 16x16. The icons are located in the "images" subdirectory of Shortcut Menu Bar's extension folder (in .vscode\extensions).

GorvGoyl commented 3 years ago

The problem is that the svg icons are 512x512, which is not in conformity with VS Code's "official" spec. The official documentation specifies icon sizes of 16x16. For whatever reason this official spec was never enforced. The new VS Code release inadvertently enforces it.

Long story short, due to complaints, Microsoft will be releasing a fix. I have both VS Code stable and Insiders installed on my system, and it has been fixed in the latest version of VS Code Insiders.

It may not be coming to the stable release immediately though. Perhaps next month? Not sure.

If you want immediate fix, resize the SVG icons you use to 16x16. The icons are located in the "images" subdirectory of Shortcut Menu Bar's extension folder (in .vscode\extensions).

could you point me to the documentation that says to use 16x16 svg?

michelsciortino commented 3 years ago

could you point me to the documentation that says to use 16x16 svg?

https://code.visualstudio.com/api/references/contribution-points#Command-icon-specifications

GitMensch commented 3 years ago

could you point me to the documentation that says to use 16x16 svg?

It is in the contribution points docs and was added with https://github.com/microsoft/vscode-docs/commit/64d884e73da3c9562f6131ac09ed39cfd86e8b50, committed on 23 Oct 2019 (after the initial icons were added) to this extensions as follows:

Icons should be 16x16 with a 1 pixel padding (image is 14x14) and centered.

It may be reasonable to rescale and check the padding (and obviously not that hard), even if VSCode Insiders applied the workaround of using a 16px background that the images are out in with https://github.com/microsoft/vscode/commit/2c4f3cb9a5400a5f649fdbf642f3877be52c7183.

SolarTheory commented 3 years ago

could you point me to the documentation that says to use 16x16 svg?

michelsciortino and GitMensch beat me to it. For context, it is mentioned by a VS Code team member in Issue 123041. That's where I first saw it while researching the bug.

Since I only turn on a few SMB icons, and I wanted to get rid of the eyesore, I resized and replaced the few I use for the temporary fix, while we wait for the workaround to be pushed to the stable channel.

GorvGoyl commented 3 years ago

Alright I'm fixing it

GorvGoyl commented 3 years ago

Fixed. restart VSCode and update shortcut menu bar extension.

jskim82 commented 3 years ago

The command icon is shown below

test

GitMensch commented 2 years ago

I'm quite sure this is fixed now, can we close and unpin it?

SolarTheory commented 2 years ago

Oops. Sorry, I forgot!