这在关于偏好的评论中有概述:
// Adaptive theme only: controls if a custom or default title bar is used.
// Note that on Windows, the hamburger menu is used whenever this is
// enabled and the adaptive theme is in use.
"themed_title_bar": true,
关键部分是默认情况下仅在Adaptive 主题中支持此功能。
为了使标题栏成为主题,主题本身需要提供一个主题规则,并且(理想情况下)该主题规则将与此处的设置相关联。
为了在其他主题中获得主题标题栏,您需要让主题的作者支持它,或者创建自定义。
从命令面板中选择UI: Customize Theme 将打开一个类似于设置窗口的窗口,允许您向当前主题添加规则。
这样的事情会增加对设置的支持;您可能需要将颜色调整为更匹配的颜色。此外,如果右侧窗格已经有您进行的其他自定义,只需将规则复制到文件的适当部分即可。
// Documentation at https://www.sublimetext.com/docs/themes.html
{
"variables":
{
},
"rules":
[
{
"class": "title_bar",
"settings": ["themed_title_bar"],
"fg": "color(white)",
"bg": "color(var(--background) blend(white 85%))",
},
]
}
[编辑]
themed_title_bar 仅适用于 Windows 和 MacOS;在 Linux 下它什么也不做,因为自定义窗口装饰是窗口管理器主题的工作。
在 Linux 上有一个不同的选项,gtk_client_side_window_decorations 控制是否启用客户端窗口装饰。如果您使用的是 gnome,则默认值为 true,否则为 false。
您可以在用户首选项中明确设置它以打开或关闭它(需要重新启动 Sublime Text)。
更多详情请见Sublime Text 4 hide title bar。