Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
60729e01
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
60729e01
编写于
3月 20, 2018
作者:
C
Christof Marti
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Single OK button right of filter text (#45589)
上级
24a7cb0c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
21 deletion
+29
-21
src/vs/workbench/browser/parts/quickinput/quickInput.css
src/vs/workbench/browser/parts/quickinput/quickInput.css
+16
-8
src/vs/workbench/browser/parts/quickinput/quickInput.ts
src/vs/workbench/browser/parts/quickinput/quickInput.ts
+11
-11
src/vs/workbench/browser/parts/quickinput/quickInputBox.ts
src/vs/workbench/browser/parts/quickinput/quickInputBox.ts
+2
-2
未找到文件。
src/vs/workbench/browser/parts/quickinput/quickInput.css
浏览文件 @
60729e01
...
...
@@ -12,21 +12,29 @@
margin-left
:
-300px
;
}
.quick-input-header
{
display
:
flex
;
padding
:
6px
;
}
.quick-input-box
{
margin
:
6px
;
flex-grow
:
1
;
}
.quick-input-
actions
{
padding
:
3
px
;
.quick-input-
box
.monaco-inputbox
>
.wrapper
>
.input
{
padding
-left
:
14
px
;
}
.quick-input-actions
button
{
.quick-input-action
{
margin-left
:
6px
;
border
:
0
;
padding
:
0px
4px
1px
4px
;
float
:
right
;
margin-left
:
4px
;
}
.quick-input-action
s
button
:focus
{
.quick-input-action
:focus
{
outline
:
0
;
}
\ No newline at end of file
}
.quick-input-checkbox-list
{
margin-left
:
3px
;
}
src/vs/workbench/browser/parts/quickinput/quickInput.ts
浏览文件 @
60729e01
...
...
@@ -22,6 +22,7 @@ import { QuickInputCheckboxList } from './quickInputCheckboxList';
import
{
QuickInputBox
}
from
'
./quickInputBox
'
;
import
{
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
localize
}
from
'
vs/nls
'
;
const
$
=
dom
.
$
;
...
...
@@ -57,7 +58,9 @@ export class QuickInputService extends Component implements IQuickInputService {
this
.
container
=
dom
.
append
(
workbench
,
$
(
'
.quick-input-widget
'
));
this
.
container
.
style
.
display
=
'
none
'
;
this
.
inputBox
=
new
QuickInputBox
(
this
.
container
);
const
headerContainer
=
dom
.
append
(
this
.
container
,
$
(
'
.quick-input-header
'
));
this
.
inputBox
=
new
QuickInputBox
(
headerContainer
);
this
.
toUnbind
.
push
(
this
.
inputBox
);
this
.
inputBox
.
style
(
this
.
themeService
.
getTheme
());
this
.
inputBox
.
onInput
(
value
=>
{
...
...
@@ -85,17 +88,13 @@ export class QuickInputService extends Component implements IQuickInputService {
}
}));
const
ok
=
dom
.
append
(
headerContainer
,
$
(
'
button.quick-input-action
'
));
ok
.
textContent
=
localize
(
'
ok
'
,
"
OK
"
);
this
.
toUnbind
.
push
(
dom
.
addDisposableListener
(
ok
,
dom
.
EventType
.
CLICK
,
e
=>
this
.
close
(
true
)));
this
.
checkboxList
=
this
.
instantiationService
.
createInstance
(
QuickInputCheckboxList
,
this
.
container
);
this
.
toUnbind
.
push
(
this
.
checkboxList
);
const
buttonContainer
=
dom
.
append
(
this
.
container
,
$
(
'
.quick-input-actions
'
));
const
cancel
=
dom
.
append
(
buttonContainer
,
$
(
'
button
'
));
cancel
.
textContent
=
'
Cancel
'
;
// TODO
this
.
toUnbind
.
push
(
dom
.
addDisposableListener
(
cancel
,
dom
.
EventType
.
CLICK
,
e
=>
this
.
close
(
false
)));
const
ok
=
dom
.
append
(
buttonContainer
,
$
(
'
button
'
));
ok
.
textContent
=
'
OK
'
;
// TODO
this
.
toUnbind
.
push
(
dom
.
addDisposableListener
(
ok
,
dom
.
EventType
.
CLICK
,
e
=>
this
.
close
(
true
)));
this
.
toUnbind
.
push
(
dom
.
addDisposableListener
(
this
.
container
,
'
focusout
'
,
(
e
:
FocusEvent
)
=>
{
for
(
let
element
=
<
Element
>
e
.
relatedTarget
;
element
;
element
=
element
.
parentElement
)
{
if
(
element
===
this
.
container
)
{
...
...
@@ -184,7 +183,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const
buttonBackgroundColor
=
theme
.
getColor
(
buttonBackground
);
const
buttonForegroundColor
=
theme
.
getColor
(
buttonForeground
);
collector
.
addRule
(
`.quick-input-action
s button
{
collector
.
addRule
(
`.quick-input-action {
${
buttonBackgroundColor
?
`background-color:
${
buttonBackgroundColor
}
;`
:
''
}
${
buttonForegroundColor
?
`color:
${
buttonForegroundColor
}
;`
:
''
}
${
contrastBorderColor
?
`border: 1px solid
${
contrastBorderColor
}
;`
:
''
}
...
...
@@ -192,6 +191,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
const
buttonHoverBackgroundColor
=
theme
.
getColor
(
buttonHoverBackground
);
if
(
buttonHoverBackgroundColor
)
{
collector
.
addRule
(
`.quick-input-actions button:hover { background-color:
${
buttonHoverBackgroundColor
}
; }`
);
collector
.
addRule
(
`.quick-input-action:hover { background-color:
${
buttonHoverBackgroundColor
}
; }`
);
collector
.
addRule
(
`.quick-input-action:focus { background-color:
${
buttonHoverBackgroundColor
}
; }`
);
}
});
src/vs/workbench/browser/parts/quickinput/quickInputBox.ts
浏览文件 @
60729e01
...
...
@@ -8,7 +8,7 @@
import
'
vs/css!./quickInput
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
import
{
InputBox
}
from
'
vs/base/browser/ui/inputbox/inputBox
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
inputBackground
,
inputForeground
,
inputBorder
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
ITheme
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
dispose
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
...
...
@@ -16,7 +16,7 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
const
$
=
dom
.
$
;
const
DEFAULT_INPUT_ARIA_LABEL
=
nls
.
localize
(
'
quickInputBoxAriaLabel
'
,
"
Type to narrow down results.
"
);
const
DEFAULT_INPUT_ARIA_LABEL
=
localize
(
'
quickInputBoxAriaLabel
'
,
"
Type to narrow down results.
"
);
export
class
QuickInputBox
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录