问题描述
我一直在为Sublime Text编辑自己的主题,但是我一度陷入困境.
I've been editing my own theme for Sublime Text, but I got stuck at one bit.
我找不到修改搜索栏的输入"字段颜色的方法.我已经设法将背景图像应用于输入的容器(如在带边框的图像下面看到的那样),但是我无法删除输入的白色背景.
I couldn't find a way to modify the color of the Input field of the search bar. I've managed to apply a background image to the container of the input (as you can see in the image bellow with a border), but I couldn't remove the white background of the input.
我知道这是一种删除方法,因为苏打水主题的颜色不同.问题是:如何?
I know that it got be a way to remove, because the Soda themes have different colors there. The question is: how?
而且,是否可以更改此输入的字体颜色?
And also, is it possible to change the font color of this input?
谢谢!卢卡斯
推荐答案
首先,此处的所有示例代码均来自苏打主题.这是一个很棒的主题.
First of all, all example codes here are from Soda Theme. It is a wonderful theme.
您可以创建自定义配色方案并使用它.看来这可能会影响所有小部件,例如输出,侧栏和输入字段. 您需要重新启动Sublime Text才能使其生效.
You can create a custom color scheme and use it. It seems that this may affect all widgets, such as output, side bar and the input fields. And you need to restart Sublime Text to make it take affect.
采用窗口小部件-例如,苏打水Dark.stTheme :更改background
值.
<string>Soda Dark - Widget Theme</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#383838</string>
<key>caret</key>
<string>#F8F8F8</string>
<key>foreground</key>
<string>#F8F8F8</string>
<key>invisibles</key>
<string>#3B3B3B</string>
将其用作配色方案:
{
"color_scheme": "Packages/Theme - Soda/Soda Dark/Widget - Soda Dark.stTheme",
"draw_shadows": false
}
此外,您可以通过text_line_control
自定义主题中的文本输入字段.
Besides, you can custom the text input fields in your theme via text_line_control
.
// Text input field item
{
"class": "text_line_control",
"layer0.texture": "Theme - Soda/Soda Dark/text-field.png",
"layer0.opacity": 1.0,
"layer0.inner_margin": [4, 5, 4, 3],
"content_margin": [3, 3]
},
这篇关于Sublime Text主题:更改搜索栏的背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!