mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 01:32:34 -05:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
'use strict';
|
||||
|
||||
import 'vs/css!./media/part';
|
||||
import { Dimension, Builder } from 'vs/base/browser/builder';
|
||||
import { Component } from 'vs/workbench/common/component';
|
||||
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
|
||||
import { Dimension, size } from 'vs/base/browser/dom';
|
||||
|
||||
export interface IPartOptions {
|
||||
hasTitle?: boolean;
|
||||
@@ -20,9 +20,9 @@ export interface IPartOptions {
|
||||
* and mandatory content area to show content.
|
||||
*/
|
||||
export abstract class Part extends Component {
|
||||
private parent: Builder;
|
||||
private titleArea: Builder;
|
||||
private contentArea: Builder;
|
||||
private parent: HTMLElement;
|
||||
private titleArea: HTMLElement;
|
||||
private contentArea: HTMLElement;
|
||||
private partLayout: PartLayout;
|
||||
|
||||
constructor(
|
||||
@@ -47,7 +47,7 @@ export abstract class Part extends Component {
|
||||
*
|
||||
* Called to create title and content area of the part.
|
||||
*/
|
||||
public create(parent: Builder): void {
|
||||
public create(parent: HTMLElement): void {
|
||||
this.parent = parent;
|
||||
this.titleArea = this.createTitleArea(parent);
|
||||
this.contentArea = this.createContentArea(parent);
|
||||
@@ -60,35 +60,35 @@ export abstract class Part extends Component {
|
||||
/**
|
||||
* Returns the overall part container.
|
||||
*/
|
||||
public getContainer(): Builder {
|
||||
public getContainer(): HTMLElement {
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses override to provide a title area implementation.
|
||||
*/
|
||||
protected createTitleArea(parent: Builder): Builder {
|
||||
protected createTitleArea(parent: HTMLElement): HTMLElement {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title area container.
|
||||
*/
|
||||
protected getTitleArea(): Builder {
|
||||
protected getTitleArea(): HTMLElement {
|
||||
return this.titleArea;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subclasses override to provide a content area implementation.
|
||||
*/
|
||||
protected createContentArea(parent: Builder): Builder {
|
||||
protected createContentArea(parent: HTMLElement): HTMLElement {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the content area container.
|
||||
*/
|
||||
protected getContentArea(): Builder {
|
||||
protected getContentArea(): HTMLElement {
|
||||
return this.contentArea;
|
||||
}
|
||||
|
||||
@@ -104,8 +104,7 @@ const TITLE_HEIGHT = 35;
|
||||
|
||||
export class PartLayout {
|
||||
|
||||
constructor(container: Builder, private options: IPartOptions, titleArea: Builder, private contentArea: Builder) {
|
||||
}
|
||||
constructor(container: HTMLElement, private options: IPartOptions, titleArea: HTMLElement, private contentArea: HTMLElement) { }
|
||||
|
||||
public layout(dimension: Dimension): Dimension[] {
|
||||
const { width, height } = dimension;
|
||||
@@ -133,7 +132,7 @@ export class PartLayout {
|
||||
|
||||
// Content
|
||||
if (this.contentArea) {
|
||||
this.contentArea.size(contentSize.width, contentSize.height);
|
||||
size(this.contentArea, contentSize.width, contentSize.height);
|
||||
}
|
||||
|
||||
return sizes;
|
||||
|
||||
Reference in New Issue
Block a user