VSCode:选项卡颜色不响应自定义 [英] VSCode: tab color not responding to customization

查看:61
本文介绍了VSCode:选项卡颜色不响应自定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为选项卡设置了自定义颜色,使它们更容易看到活动与非活动状态,但在某些选项卡上 - 我找不到它的模式,自定义不坚持.前景色为红色或粉红色,应为浅灰色.

I've set up custom colors for the tabs to make them easier to see active vs. inactive, but on some tabs - and I can't find a pattern to it, the customization doesn't stick. The foreground color is red or pink, and it should be light gray.

设置 JSON 文件在图片中,我找不到任何其他引用选项卡"的设置,所以我错过了什么?

Settings JSON file is in the picture, and I can't find any other settings that refer to "tabs", so what am I missing?

谢谢!

推荐答案

我已将文件中的项目分解为我自己的示例,并使用鲜艳的颜色来帮助区分它们:

I've broken it down for the items you have in your file using my own as an example with vibrant colors to help distinguish them:

我的setting.json:

My setting.json:

"workbench.colorCustomizations": {
        "[Default Dark+]": {
            "tab.activeBackground": "#0004ff",
            "tab.activeForeground": "#e100ff",
            "tab.inactiveBackground": "#00ff62",
            "tab.inactiveForeground": "#00b7ff",
            "tab.lastPinnedBorder": "#fafafa",
            "tab.unfocusedActiveForeground": "#fbff00",
            "tab.unfocusedActiveBackground": "#ff0000",
        }
    }

对应组件(最好放大图片):

Corresponding components (it's best if you enlarge the image):

注意事项:

  • 分组很重要 - 属性仅适用于当前活动/非活动组.一个组是每个活动的编辑器窗口.在我的图片中,有两组,活动的一组在左侧(对焦)和不活动的一组在右侧(失焦).所有这些属性的工具提示说明它们适用于分组.例如,tab.activeBackground 的工具提示说明如下:
  • Groupings matter - the properties only apply to the currently active/inactive group. A group is each active editor window. In my picture, there are two groups, with the active one on the left (in focus) and the inactive one on the right (out of focus). The tooltips to all of these properties state they apply to groupings. For example, tab.activeBackground's tool tip states the following:

活动组

  • tab.lastPinnedBorder 属性仅适用于固定的最后一个选项卡(顾名思义).我个人觉得这是一个奇怪的选择.如果我要固定一个新标签,白线会移动到该标签.
  • 属性名称有点误导.如果它没有unfocused"这个词在其中,它表示活动组(但这些属性名称不包含focused"一词).
  • 确保您在设置中选择了与您在 JSON 中指定的主题相对应的正确主题.在我的示例中,我在我的设置中选择了 [Default Dark+] 主题(它实际上在设置的下拉菜单中称为 Dark+(默认暗)),因此我个人应用了 JSON 属性.我相信 Dark+ 是您第一次安装 Visual Studio Code 时的默认设置(除非它脱离了系统首选的颜色主题——我不确定它是否如此).
    • The tab.lastPinnedBorder property only applies to the last tab that was pinned (as the name would suggest). Personally I feel this is a bizarre option. If I were to pin a new tab, the white line would move to said tab.
    • The property names are slightly misleading. If it doesn't have the word "unfocused" in it, it means the active group (yet these property names do not contain the word "focused").
    • Make sure you have the correct theme selected in your settings that corresponds to the theme you are specifying in your JSON. In my example I have the [Default Dark+] theme selected in my settings (it's actually called Dark+ (default dark) in the drop down in the settings), thus my individual JSON properties are applied. I believe Dark+ is the default when you first install Visual Studio Code (unless it goes off of the systems preferred color theme - I'm not sure if it does).
    • 这篇关于VSCode:选项卡颜色不响应自定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆