Revert "adding titlebar icon svg"

This reverts commit 8cadcf172e.
This commit is contained in:
Benjamin Pasero 2018-06-19 09:17:25 +02:00
parent 5b884fe313
commit 74a101506f
4 changed files with 13 additions and 15 deletions

View file

@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.25.0",
"distro": "e781cd4cf9c4c77fa3c0fcb04017a3ba57cde7a2",
"distro": "5f30bb6859641677a2676f623f994f923e609469",
"author": {
"name": "Microsoft Corporation"
},

View file

@ -1 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 559 B

View file

@ -54,16 +54,14 @@
}
.monaco-workbench > .part.titlebar > .window-appicon {
width: 35px;
width: 15px;
padding-left: 10px;
margin-right: 113px;
-webkit-app-region: no-drag;
position: relative;
z-index: 99;
order: 1;
background-image: url('code-icon.svg');
background-repeat: no-repeat;
background-position: center center;
background-size: 16px;
image-rendering: crisp-edges;
}
.monaco-workbench > .part.titlebar > .window-controls-container {

View file

@ -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,8 +251,9 @@ export class TitlebarPart extends Part implements ITitleService {
// App Icon (Windows/Linux)
if (!isMacintosh) {
this.appIcon = $(this.titleContainer).div({
this.appIcon = $(this.titleContainer).img({
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);
@ -456,14 +457,14 @@ export class TitlebarPart extends Part implements ITitleService {
this.initialSizing.appIconWidth = parseInt(this.appIcon.getComputedStyle().width, 10);
}
if (typeof this.initialSizing.appIconSize !== 'number') {
this.initialSizing.appIconSize = parseInt(this.appIcon.getComputedStyle().backgroundSize, 10);
if (typeof this.initialSizing.appIconLeftPadding !== 'number') {
this.initialSizing.appIconLeftPadding = parseInt(this.appIcon.getComputedStyle().paddingLeft, 10);
}
const currentAppIconHeight = parseInt(this.appIcon.getComputedStyle().height, 10);
const newControlsWidth = this.initialSizing.controlsWidth / getZoomFactor();
const newAppIconWidth = this.initialSizing.appIconWidth / getZoomFactor();
const newAppIconSize = this.initialSizing.appIconSize / getZoomFactor();
const newAppIconPaddingLeft = this.initialSizing.appIconLeftPadding / getZoomFactor();
if (!this.menubarWidth) {
this.menubarWidth = 0;
@ -482,9 +483,9 @@ export class TitlebarPart extends Part implements ITitleService {
// Adjust app icon mimic menubar
this.appIcon.style({
'width': `${newAppIconWidth}px`,
'background-size': `${newAppIconSize}px`,
'margin-right': `${newControlsWidth - newAppIconWidth + bufferWidth}px`,
width: `${newAppIconWidth}px`,
'padding-left': `${newAppIconPaddingLeft}px`,
'margin-right': `${newControlsWidth - newAppIconWidth - newAppIconPaddingLeft + bufferWidth}px`,
'padding-top': `${(newHeight - currentAppIconHeight) / 2.0}px`,
'padding-bottom': `${(newHeight - currentAppIconHeight) / 2.0}px`
});