add icons for preview and view source

This commit is contained in:
Johannes Rieken
2016-06-16 10:50:37 +02:00
parent f80da3732b
commit 8c2fb77935
4 changed files with 26 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><polygon fill="#656565" points="10,2 7.414,2 8.414,3 9,3 9,3.586 9,4 9,4.414 9,6 12,6 12,13 4,13 4,8 3,8 3,14 13,14 13,5"/><polygon fill="#00539C" points="5,1 3,1 5,3 1,3 1,5 5,5 3,7 5,7 8,4"/></svg>

After

Width:  |  Height:  |  Size: 419 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><polygon fill="#C5C5C5" points="10,2 7.414,2 8.414,3 9,3 9,3.586 9,4 9,4.414 9,6 12,6 12,13 4,13 4,8 3,8 3,14 13,14 13,5"/><polygon fill="#75BEFF" points="5,1 3,1 5,3 1,3 1,5 5,5 3,7 5,7 8,4"/></svg>

After

Width:  |  Height:  |  Size: 262 B

+21 -2
View File
@@ -42,11 +42,30 @@
"commands": [
{
"command": "extension.previewMarkdown",
"title": "%markdown.previewMarkdown.title%"
"title": "%markdown.previewMarkdown.title%",
"context": [{
"where": "editor/primary",
"when": "markdown",
"icon": {
"light": "./media/Preview.svg",
"dark": "./media/Preview_inverse.svg"
}
},{
"where": "editor/primary",
"when": { "scheme": "markdown" },
"icon": {
"light": "./media/ViewSource.svg",
"dark": "./media/ViewSource_inverse.svg"
}
}]
},
{
"command": "extension.previewMarkdownSide",
"title": "%markdown.previewMarkdownSide.title%"
"title": "%markdown.previewMarkdownSide.title%",
"context": {
"where": "editor/secondary",
"when": "markdown"
}
}
],
"keybindings": [
+1 -1
View File
@@ -62,7 +62,7 @@ function isMarkdownFile(document: vscode.TextDocument) {
}
function getMarkdownUri(document: vscode.TextDocument) {
return document.uri.with({ scheme: 'markdown', query: document.uri.toString() });
return document.uri.with({ scheme: 'markdown', path: String(document.version), query: document.uri.toString() });
}
function openPreview(sideBySide?: boolean): void {