提交 326d5545 编写于 作者: J Johannes Rieken

move height into control

上级 4adbb055
......@@ -20,7 +20,6 @@ import { IEditorOptions } from 'vs/platform/editor/common/editor';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
export const EDITOR_TITLE_HEIGHT = 35;
export const BREAD_CRUMBS_HEIGHT = 25;
export const DEFAULT_EDITOR_MIN_DIMENSIONS = new Dimension(220, 70);
export const DEFAULT_EDITOR_MAX_DIMENSIONS = new Dimension(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
......
......@@ -130,6 +130,10 @@ export class EditorBreadcrumbs implements IEditorBreadcrumbs {
this._ckBreadcrumbsVisible.reset();
}
getPreferredHeight(): number {
return 25;
}
layout(dim: dom.Dimension): void {
this._domNode.style.width = `${dim.width}px`;
this._domNode.style.height = `${dim.height}px`;
......
......@@ -34,7 +34,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { RunOnceWorker } from 'vs/base/common/async';
import { EventType as TouchEventType, GestureEvent } from 'vs/base/browser/touch';
import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl';
import { IEditorGroupsAccessor, IEditorGroupView, IEditorPartOptionsChangeEvent, EDITOR_TITLE_HEIGHT, BREAD_CRUMBS_HEIGHT, getActiveTextEditorOptions, IEditorOpeningEvent } from 'vs/workbench/browser/parts/editor/editor';
import { IEditorGroupsAccessor, IEditorGroupView, IEditorPartOptionsChangeEvent, EDITOR_TITLE_HEIGHT, getActiveTextEditorOptions, IEditorOpeningEvent } from 'vs/workbench/browser/parts/editor/editor';
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
import { join } from 'vs/base/common/paths';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
......@@ -1376,8 +1376,8 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Forward to controls
this.titleAreaControl.layout(new Dimension(this.dimension.width, EDITOR_TITLE_HEIGHT));
this.breadcrumbsControl.layout(new Dimension(this.dimension.width, BREAD_CRUMBS_HEIGHT));
this.editorControl.layout(new Dimension(this.dimension.width, this.dimension.height - (EDITOR_TITLE_HEIGHT + BREAD_CRUMBS_HEIGHT)));
this.breadcrumbsControl.layout(new Dimension(this.dimension.width, this.breadcrumbsControl.getPreferredHeight()));
this.editorControl.layout(new Dimension(this.dimension.width, this.dimension.height - (EDITOR_TITLE_HEIGHT + this.breadcrumbsControl.getPreferredHeight())));
}
toJSON(): ISerializedEditorGroup {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册