提交 48084115 编写于 作者: B Benjamin Pasero

make some room for tabs container

上级 5e9b9ae6
......@@ -3,17 +3,25 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/* Tabs Container */
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .tabs-container {
flex: 1;
}
/* Title Actions */
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .title-actions {
display: flex;
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .group-actions {
flex: initial;
padding-left: 4px;
background-color: rgba(128, 128, 128, 0.2);
}
.monaco-workbench > .part.editor > .content > .one-editor-container .title.inactive .title-actions {
.monaco-workbench > .part.editor > .content > .one-editor-container .title.inactive .group-actions {
opacity: 0.5;
}
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .title-actions .action-label {
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .group-actions .action-label {
display: block;
height: 35px;
width: 28px;
......@@ -22,11 +30,6 @@
background-repeat: no-repeat;
}
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .title-actions .action-label .label {
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .group-actions .action-label .label {
display: none;
}
.monaco-workbench > .part.editor > .content > .one-editor-container > .title .title-actions .editor-group-toolbar {
padding-left: 4px;
background-color: rgba(128, 128, 128, 0.2);
}
\ No newline at end of file
......@@ -52,14 +52,21 @@ export class TabsTitleControl extends TitleControl {
public create(parent: Builder): void {
this.titleContainer = $(parent);
// Tabs Container
parent.div({
'class': 'tabs-container'
}, (div) => {
});
// Group Actions Container
parent.div({
'class': 'title-actions'
'class': 'group-actions'
}, (div) => {
// Editor actions
// Group actions toolbar
this.groupActionsToolbar = this.doCreateToolbar(div);
this.groupActionsToolbar.getContainer().addClass('editor-group-toolbar');
});
}
......@@ -79,6 +86,15 @@ export class TabsTitleControl extends TitleControl {
return; // return early if we are being closed
}
const isActive = this.stacks.isActive(group);
// Activity state
if (isActive) {
this.titleContainer.removeClass('inactive');
} else {
this.titleContainer.addClass('inactive');
}
// Update Group Actions Toolbar
const groupActions = this.getGroupActions(group);
const primaryGroupActions = prepareActions(groupActions.primary);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册