Skip to content

目前已注册的MenuId, 对应这个位置的是MenuId.EditorTitle? 支持定义图标吗? #1694

Answered by bytemain
bytemain asked this question in Q&A
Discussion options

You must be logged in to vote

首先:
目前没办法,需要的话可以自己修改 @opensumi/ide-editor 模块实现。如果要把菜单注册到 ... 菜单内,可以看一下菜单内的内容,翻一下源码看一下,我记得是 group 改一下就行了,改成 group: '0_internal'

第二:
可以用 iconService 来转换图标

这里的 icon 支持用 $(xxx) 来指定 codicon (https://microsoft.github.io/vscode-codicons/dist/codicon.html), 用法类似 iconService.fromString('$(diff)'),iconService 可以把 codicon 转换成 css class

用 iconService.fromIcon 可以把一个图片 url 转换成 css class

Replies: 1 comment

Comment options

bytemain
Sep 21, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by bytemain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant