提交 74c21155 编写于 作者: S SteVen Batten

make menubarpart independent of titlebarpart

上级 60e8c7c2
......@@ -3,17 +3,16 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.monaco-workbench > .part.titlebar > .menubar-container {
.monaco-workbench > .part.menubar {
display: flex;
position: relative;
z-index: 100;
position: absolute;
height: 29px;
-webkit-app-region: no-drag;
order: 3;
box-sizing: border-box;
margin-left: 35px;
}
.monaco-workbench > .part.titlebar > .menubar-container > .menubar-menu-button {
.monaco-workbench > .part.menubar > .menubar-menu-button {
display: flex;
align-items: center;
line-height: 25px;
......@@ -21,15 +20,16 @@
box-sizing: border-box;
padding: 0px 5px;
position: relative;
z-index: 900;
z-index: 10;
cursor: pointer;
-webkit-app-region: no-drag;
}
.monaco-workbench > .part.titlebar > .menubar-container > .menubar-menu-button:hover {
.monaco-workbench > .part.menubar > .menubar-menu-button:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.monaco-workbench > .part.titlebar.light > .menubar-container > .menubar-menu-button:hover {
.monaco-workbench > .part.menubar > .menubar-menu-button:hover {
background-color: rgba(0, 0, 0, 0.1);
}
......
......@@ -56,7 +56,7 @@
-webkit-app-region: no-drag;
margin: 0 10px;
position: relative;
z-index: 100;
z-index: 99;
order: 2;
}
......@@ -81,15 +81,16 @@
margin-left: auto;
text-align: center;
position: relative;
z-index: 100;
bottom: calc(1.5em / 12);
z-index: 99;
/* bottom: calc(1.5em / 12); */
order: 4;
-webkit-app-region: no-drag;
height: 100%;
}
.monaco-workbench > .part.titlebar > .window-controls-container > .window-icon svg {
width: calc(10em / 12);
height: calc(10em / 12);
height: 100%;
shape-rendering: crispEdges;
text-align: center;
}
......
......@@ -48,7 +48,6 @@ export class TitlebarPart extends Part implements ITitleService {
private static readonly TITLE_SEPARATOR = isMacintosh ? '' : ' - '; // macOS uses special - separator
private titleContainer: Builder;
private menubarContainer: Builder;
private title: Builder;
private pendingTitle: string;
private initialTitleFontSize: number;
......@@ -242,10 +241,6 @@ export class TitlebarPart extends Part implements ITitleService {
});
}
if (isWindows) {
this.menubarContainer = $(this.titleContainer).div({ class: 'menubar-container' });
}
// Title
this.title = $(this.titleContainer).div({ class: 'window-title' });
if (this.pendingTitle) {
......@@ -445,10 +440,6 @@ export class TitlebarPart extends Part implements ITitleService {
return super.layout(dimension);
}
public getMenubarContainer(): Builder {
return this.menubarContainer;
}
}
class ShowItemInFolderAction extends Action {
......
......@@ -1257,7 +1257,11 @@ export class Workbench implements IPartService {
}
private createMenubarPart(): void {
const menubarContainer = this.titlebarPart.getMenubarContainer();
const menubarContainer = $(this.workbench).div({
'class': ['part', 'menubar'],
id: Identifiers.MENUBAR_PART,
role: 'menubar'
});
this.menubarPart.create(menubarContainer.getHTMLElement());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册