mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
adding titlebar icon svg
This commit is contained in:
parent
2e5253d493
commit
8cadcf172e
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "code-oss-dev",
|
||||
"version": "1.25.0",
|
||||
"distro": "5f30bb6859641677a2676f623f994f923e609469",
|
||||
"distro": "e781cd4cf9c4c77fa3c0fcb04017a3ba57cde7a2",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<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>
|
After Width: | Height: | Size: 559 B |
|
@ -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 {
|
||||
|
|
|
@ -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.appIconLeftPadding !== 'number') {
|
||||
this.initialSizing.appIconLeftPadding = parseInt(this.appIcon.getComputedStyle().paddingLeft, 10);
|
||||
if (typeof this.initialSizing.appIconSize !== 'number') {
|
||||
this.initialSizing.appIconSize = 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 newAppIconPaddingLeft = this.initialSizing.appIconLeftPadding / getZoomFactor();
|
||||
const newAppIconSize = 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`
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue