Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
3918447f
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3918447f
编写于
1月 29, 2020
作者:
J
Jackson Kearl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add style token for search editor input border. Fixes #89437.
上级
2e92c8fb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
4 deletion
+16
-4
extensions/theme-defaults/themes/light_defaults.json
extensions/theme-defaults/themes/light_defaults.json
+2
-1
src/vs/workbench/contrib/search/browser/patternInputWidget.ts
...vs/workbench/contrib/search/browser/patternInputWidget.ts
+7
-2
src/vs/workbench/contrib/search/browser/searchEditor.ts
src/vs/workbench/contrib/search/browser/searchEditor.ts
+7
-1
未找到文件。
extensions/theme-defaults/themes/light_defaults.json
浏览文件 @
3918447f
...
...
@@ -13,9 +13,10 @@
"sideBarTitle.foreground"
:
"#6F6F6F"
,
"list.hoverBackground"
:
"#E8E8E8"
,
"input.placeholderForeground"
:
"#767676"
,
"searchEditor.textInputBorder"
:
"#CECECE"
,
"settings.textInputBorder"
:
"#CECECE"
,
"settings.numberInputBorder"
:
"#CECECE"
,
"statusBarItem.remoteForeground"
:
"#FFF"
,
"statusBarItem.remoteBackground"
:
"#16825D"
}
}
\ No newline at end of file
}
src/vs/workbench/contrib/search/browser/patternInputWidget.ts
浏览文件 @
3918447f
...
...
@@ -8,7 +8,7 @@ import * as dom from 'vs/base/browser/dom';
import
{
Widget
}
from
'
vs/base/browser/ui/widget
'
;
import
{
Checkbox
}
from
'
vs/base/browser/ui/checkbox/checkbox
'
;
import
{
IContextViewProvider
}
from
'
vs/base/browser/ui/contextview/contextview
'
;
import
{
IInputValidator
,
HistoryInputBox
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
IInputValidator
,
HistoryInputBox
,
IInputBoxStyles
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
{
IKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
Event
as
CommonEvent
,
Emitter
}
from
'
vs/base/common/event
'
;
...
...
@@ -19,6 +19,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ISearchConfigurationProperties
}
from
'
vs/workbench/services/search/common/search
'
;
import
{
Delayer
}
from
'
vs/base/common/async
'
;
import
type
{
IThemable
}
from
'
vs/base/common/styler
'
;
export
interface
IOptions
{
placeholder
?:
string
;
...
...
@@ -30,7 +31,7 @@ export interface IOptions {
submitOnTypeDelay
?:
number
;
}
export
class
PatternInputWidget
extends
Widget
{
export
class
PatternInputWidget
extends
Widget
implements
IThemable
{
static
OPTION_CHANGE
:
string
=
'
optionChange
'
;
...
...
@@ -133,6 +134,10 @@ export class PatternInputWidget extends Widget {
this
.
inputBox
.
showPreviousValue
();
}
style
(
styles
:
IInputBoxStyles
):
void
{
this
.
inputBox
.
style
(
styles
);
}
private
render
(
options
:
IOptions
):
void
{
this
.
domNode
=
document
.
createElement
(
'
div
'
);
this
.
domNode
.
style
.
width
=
this
.
width
+
'
px
'
;
...
...
src/vs/workbench/contrib/search/browser/searchEditor.ts
浏览文件 @
3918447f
...
...
@@ -39,7 +39,8 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
import
{
InSearchEditor
,
InputBoxFocusedKey
}
from
'
vs/workbench/contrib/search/common/constants
'
;
import
{
IEditorProgressService
,
LongRunningOperation
}
from
'
vs/platform/progress/common/progress
'
;
import
type
{
SearchEditorInput
,
SearchConfiguration
}
from
'
vs/workbench/contrib/search/browser/searchEditorInput
'
;
import
{
searchEditorFindMatchBorder
,
searchEditorFindMatch
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
searchEditorFindMatchBorder
,
searchEditorFindMatch
,
registerColor
,
inputBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
attachInputBoxStyler
}
from
'
vs/platform/theme/common/styler
'
;
const
RESULT_LINE_REGEX
=
/^
(\s
+
)(\d
+
)(
:|
)(\s
+
)(
.*
)
$/
;
...
...
@@ -147,6 +148,9 @@ export class SearchEditor extends BaseEditor {
}));
this
.
inputPatternExcludes
.
onSubmit
(
_triggeredOnType
=>
this
.
runSearch
());
this
.
inputPatternExcludes
.
onChangeIgnoreBox
(()
=>
this
.
runSearch
());
[
this
.
queryEditorWidget
.
searchInput
,
this
.
inputPatternIncludes
,
this
.
inputPatternExcludes
].
map
(
input
=>
this
.
_register
(
attachInputBoxStyler
(
input
,
this
.
themeService
,
{
inputBorder
:
searchEditorTextInputBorder
})));
}
private
createResultsEditor
(
parent
:
HTMLElement
)
{
...
...
@@ -452,3 +456,5 @@ registerThemingParticipant((theme, collector) => {
collector
.
addRule
(
`.monaco-editor .searchEditorFindMatch { border: 1px
${
theme
.
type
===
'
hc
'
?
'
dotted
'
:
'
solid
'
}
${
findMatchHighlightBorder
}
; box-sizing: border-box; }`
);
}
});
export
const
searchEditorTextInputBorder
=
registerColor
(
'
searchEditor.textInputBorder
'
,
{
dark
:
inputBorder
,
light
:
inputBorder
,
hc
:
inputBorder
},
localize
(
'
textInputBoxBorder
'
,
"
Search editor text input box border.
"
));
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录