forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request microsoft#195222 from microsoft/benibenj/noTabBar
Allow to hide editor title section entirely (tabs, breadcrumbs) (microsoft#33607)
- Loading branch information
Showing
17 changed files
with
220 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
src/vs/workbench/browser/parts/editor/noEditorTabsControl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import 'vs/css!./media/singleeditortabscontrol'; | ||
import { EditorInput } from 'vs/workbench/common/editor/editorInput'; | ||
import { EditorTabsControl, IToolbarActions } from 'vs/workbench/browser/parts/editor/editorTabsControl'; | ||
import { Dimension } from 'vs/base/browser/dom'; | ||
import { IEditorTitleControlDimensions } from 'vs/workbench/browser/parts/editor/editorTitleControl'; | ||
|
||
export class NoEditorTabsControl extends EditorTabsControl { | ||
|
||
protected prepareEditorActions(editorActions: IToolbarActions): IToolbarActions { | ||
return { | ||
primary: [], | ||
secondary: [] | ||
}; | ||
} | ||
|
||
openEditor(editor: EditorInput): boolean { | ||
return false; | ||
} | ||
|
||
openEditors(editors: EditorInput[]): boolean { | ||
return false; | ||
} | ||
|
||
beforeCloseEditor(editor: EditorInput): void { } | ||
|
||
closeEditor(editor: EditorInput): void { } | ||
|
||
closeEditors(editors: EditorInput[]): void { } | ||
|
||
moveEditor(editor: EditorInput, fromIndex: number, targetIndex: number): void { } | ||
|
||
pinEditor(editor: EditorInput): void { } | ||
|
||
stickEditor(editor: EditorInput): void { } | ||
|
||
unstickEditor(editor: EditorInput): void { } | ||
|
||
setActive(isActive: boolean): void { } | ||
|
||
updateEditorLabel(editor: EditorInput): void { } | ||
|
||
updateEditorDirty(editor: EditorInput): void { } | ||
|
||
getHeight(): number { | ||
return 0; | ||
} | ||
|
||
layout(dimensions: IEditorTitleControlDimensions): Dimension { | ||
return new Dimension(dimensions.container.width, this.getHeight()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.