提交 d9749892 编写于 作者: I isidor

editor title use flex

上级 2da2e412
......@@ -14,6 +14,7 @@
height: 35px;
padding-left: 8px; /* use padding and not margin to avoid overflow issues */
padding-right: 8px;
display: flex;
-webkit-box-sizing: border-box;
-o-box-sizing: border-box;
-moz-box-sizing: border-box;
......@@ -51,8 +52,9 @@
.monaco-workbench > .part > .title > .title-actions,
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .title-actions {
float: right;
height: 35px;
flex: 1;
padding-left: 5px;
}
.monaco-workbench > .part > .title > .title-actions .action-label,
......
......@@ -1008,6 +1008,27 @@ export class SideBySideEditorControl extends EventEmitter implements IVerticalSa
}
});
// Left Title Label (click opens quick open unless we are configured to ignore click or we are not the active title)
parent.div({
'class': 'title-label'
}, (div) => {
let clickHandler = (e: MouseEvent) => {
if (ignoreClick) {
return;
}
DOM.EventHelper.stop(e, true);
this.quickOpenService.show();
};
// Clickable label (focus editor and bring up quick open)
this.titleLabel[position] = $(div).a().on(DOM.EventType.CLICK, clickHandler);
// Subtle Description
this.titleDescription[position] = $(div).span().on(DOM.EventType.CLICK, clickHandler);
});
// Right Actions Container
parent.div({
'class': 'title-actions'
......@@ -1034,27 +1055,6 @@ export class SideBySideEditorControl extends EventEmitter implements IVerticalSa
}
});
});
// Left Title Label (click opens quick open unless we are configured to ignore click or we are not the active title)
parent.div({
'class': 'title-label'
}, (div) => {
let clickHandler = (e: MouseEvent) => {
if (ignoreClick) {
return;
}
DOM.EventHelper.stop(e, true);
this.quickOpenService.show();
};
// Clickable label (focus editor and bring up quick open)
this.titleLabel[position] = $(div).a().on(DOM.EventType.CLICK, clickHandler);
// Subtle Description
this.titleDescription[position] = $(div).span().on(DOM.EventType.CLICK, clickHandler);
});
}
private findMoveTarget(position: Position, diffX: number): Position {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册