When I set the icon, I can't see the command when I press Alt down.

Asked 2 years ago, Updated 2 years ago, 55 views

I added a command to the editor title bar, but when I set the icon, the command when I press Alt down disappears.

Enter a description of the image here

I don't know how to set the icon when pressing Alt, so I didn't set the icon when pressing Alt.
If I set the Alt press icon, will the Alt press icon be displayed?
The command is not displayed, but when clicked, the Alt press command is executed.

Also, these commands (icon) are displayed only when the editor is split.
I think there is something wrong with the way I set it up, but I would appreciate it if you could point it out.
Also, please let me know how to set the icon when pressing Alt.

Note:
I'm creating an icon with PNG, but does it have to be SVG?
I would like to make it with SVG and try it later.
...I made it with SVG, but it didn't work.Remain in the same state

"commands":[
    {"command": "workbench.action.toggleEditorGroupLayout",
        title: "switch split direction",
        "icon": {
            "dark": ".icon/darkicon.svg",
            "light": ".icon/lighticon.svg"
        }
    }
],
    "menus": {
        "editor/title": [
        {"when": "multipleEditorGroups",
            "command": "workbench.action.toggleEditorGroupLayout",
            " alt": "workbench.action.newWindow",
            "group": "navigation"
        }

vscode

2022-09-30 17:36

1 Answers

I thought too much and didn't notice anything simple.
"Since it was solved, I could say ""simple thing"", but before I asked a question, I had trouble searching everywhere, rewriting the code, and things didn't go as well as I wanted."
"I was able to review the code from a third party, saying ""Which method did you use for this part?""

"

I added a code and suddenly thought of it, but I added Alt's command to the command.
I set the icon for "workbench.action.newWindow" and it's done!!^^v
I'm sorry to have troubled you.This will solve the problem.


2022-09-30 17:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.