问题描述
我将 sublime text 3 更新为版本 4,并且在 there article 中,他们说:
Windows 和 Linux 上的自适应主题现在具有自定义标题栏。
但是我不知道如何使用它。我尝试添加此设置:
"ui_native_titlebar": true,"themed_title_bar": true,
但没有运气。我正在使用 ayu
主题。
这是它现在的样子:
请任何人都可以帮助我,那就太好了!
我也在Linux mint。 祝您有美好的一天!
解决方法
这在首选项的评论中有概述:
// 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。
,它奏效了,这是现在的样子:
现在看起来是不是很棒?