Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
e28c2650
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,发现更多精彩内容 >>
提交
e28c2650
编写于
6月 19, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Revert "adding titlebar icon svg""
This reverts commit
74a10150
.
上级
30bd33d4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
13 deletion
+15
-13
package.json
package.json
+1
-1
src/vs/workbench/browser/parts/titlebar/media/code-icon.svg
src/vs/workbench/browser/parts/titlebar/media/code-icon.svg
+1
-0
src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
...s/workbench/browser/parts/titlebar/media/titlebarpart.css
+5
-3
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+8
-9
未找到文件。
package.json
浏览文件 @
e28c2650
{
"name"
:
"code-oss-dev"
,
"version"
:
"1.25.0"
,
"distro"
:
"
5f30bb6859641677a2676f623f994f923e609469
"
,
"distro"
:
"
e781cd4cf9c4c77fa3c0fcb04017a3ba57cde7a2
"
,
"author"
:
{
"name"
:
"Microsoft Corporation"
},
...
...
src/vs/workbench/browser/parts/titlebar/media/code-icon.svg
0 → 100644
浏览文件 @
e28c2650
<svg
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 1024 1024"
><style>
.st0{fill:#f6f6f6;fill-opacity:0}.st1{fill:#fff}.st2{fill:#167abf}
</style><path
class=
"st0"
d=
"M1024 1024H0V0h1024v1024z"
/><path
class=
"st1"
d=
"M1024 85.333v853.333H0V85.333h1024z"
/><path
class=
"st2"
d=
"M0 85.333h298.667v853.333H0V85.333zm1024 0v853.333H384V85.333h640zm-554.667 160h341.333v-64H469.333v64zm341.334 533.334H469.333v64h341.333l.001-64zm128-149.334H597.333v64h341.333l.001-64zm0-149.333H597.333v64h341.333l.001-64zm0-149.333H597.333v64h341.333l.001-64z"
/></svg>
\ No newline at end of file
src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css
浏览文件 @
e28c2650
...
...
@@ -54,14 +54,16 @@
}
.monaco-workbench
>
.part.titlebar
>
.window-appicon
{
width
:
15px
;
padding-left
:
10px
;
width
:
35px
;
margin-right
:
113px
;
-webkit-app-region
:
no-drag
;
position
:
relative
;
z-index
:
99
;
order
:
1
;
image-rendering
:
crisp-edges
;
background-image
:
url('code-icon.svg')
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
background-size
:
16px
;
}
.monaco-workbench
>
.part.titlebar
>
.window-controls-container
{
...
...
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
浏览文件 @
e28c2650
...
...
@@ -57,8 +57,8 @@ export class TitlebarPart extends Part implements ITitleService {
titleFontSize
?:
number
;
titlebarHeight
?:
number
;
controlsWidth
?:
number
;
appIconSize
?:
number
;
appIconWidth
?:
number
;
appIconLeftPadding
?:
number
;
}
=
Object
.
create
(
null
);
private
isInactive
:
boolean
;
...
...
@@ -251,9 +251,8 @@ export class TitlebarPart extends Part implements ITitleService {
// App Icon (Windows/Linux)
if
(
!
isMacintosh
)
{
this
.
appIcon
=
$
(
this
.
titleContainer
).
img
({
this
.
appIcon
=
$
(
this
.
titleContainer
).
div
({
class
:
'
window-appicon
'
,
src
:
paths
.
join
(
this
.
environmentService
.
appRoot
,
isWindows
?
'
resources/win32/code.ico
'
:
'
resources/linux/code.png
'
)
}).
on
(
EventType
.
DBLCLICK
,
e
=>
{
EventHelper
.
stop
(
e
,
true
);
...
...
@@ -457,14 +456,14 @@ export class TitlebarPart extends Part implements ITitleService {
this
.
initialSizing
.
appIconWidth
=
parseInt
(
this
.
appIcon
.
getComputedStyle
().
width
,
10
);
}
if
(
typeof
this
.
initialSizing
.
appIcon
LeftPadding
!==
'
number
'
)
{
this
.
initialSizing
.
appIcon
LeftPadding
=
parseInt
(
this
.
appIcon
.
getComputedStyle
().
paddingLeft
,
10
);
if
(
typeof
this
.
initialSizing
.
appIcon
Size
!==
'
number
'
)
{
this
.
initialSizing
.
appIcon
Size
=
parseInt
(
this
.
appIcon
.
getComputedStyle
().
backgroundSize
,
10
);
}
const
currentAppIconHeight
=
parseInt
(
this
.
appIcon
.
getComputedStyle
().
height
,
10
);
const
newControlsWidth
=
this
.
initialSizing
.
controlsWidth
/
getZoomFactor
();
const
newAppIconWidth
=
this
.
initialSizing
.
appIconWidth
/
getZoomFactor
();
const
newAppIcon
PaddingLeft
=
this
.
initialSizing
.
appIconLeftPadding
/
getZoomFactor
();
const
newAppIcon
Size
=
this
.
initialSizing
.
appIconSize
/
getZoomFactor
();
if
(
!
this
.
menubarWidth
)
{
this
.
menubarWidth
=
0
;
...
...
@@ -483,9 +482,9 @@ export class TitlebarPart extends Part implements ITitleService {
// Adjust app icon mimic menubar
this
.
appIcon
.
style
({
width
:
`
${
newAppIconWidth
}
px`
,
'
padding-left
'
:
`
${
newAppIconPaddingLeft
}
px`
,
'
margin-right
'
:
`
${
newControlsWidth
-
newAppIconWidth
-
newAppIconPaddingLeft
+
bufferWidth
}
px`
,
'
width
'
:
`
${
newAppIconWidth
}
px`
,
'
background-size
'
:
`
${
newAppIconSize
}
px`
,
'
margin-right
'
:
`
${
newControlsWidth
-
newAppIconWidth
+
bufferWidth
}
px`
,
'
padding-top
'
:
`
${(
newHeight
-
currentAppIconHeight
)
/
2.0
}
px`
,
'
padding-bottom
'
:
`
${(
newHeight
-
currentAppIconHeight
)
/
2.0
}
px`
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录