mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 12:08:36 -05:00
Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)
This commit is contained in:
@@ -20,10 +20,12 @@ const GOLDEN_RATIO = {
|
||||
rightMarginRatio: 0.1909
|
||||
};
|
||||
|
||||
function createEmptyView(background: Color): ISplitViewView {
|
||||
function createEmptyView(background: Color | undefined): ISplitViewView {
|
||||
const element = $('.centered-layout-margin');
|
||||
element.style.height = '100%';
|
||||
element.style.backgroundColor = background.toString();
|
||||
if (background) {
|
||||
element.style.backgroundColor = background.toString();
|
||||
}
|
||||
|
||||
return {
|
||||
element,
|
||||
@@ -53,7 +55,7 @@ export class CenteredViewLayout implements IDisposable {
|
||||
private splitView?: SplitView;
|
||||
private width: number = 0;
|
||||
private height: number = 0;
|
||||
private style: ICenteredViewStyles;
|
||||
private style!: ICenteredViewStyles;
|
||||
private didLayout = false;
|
||||
private emptyViews: ISplitViewView[] | undefined;
|
||||
private readonly splitViewDisposables = new DisposableStore();
|
||||
@@ -132,7 +134,8 @@ export class CenteredViewLayout implements IDisposable {
|
||||
|
||||
this.splitView.layout(this.width);
|
||||
this.splitView.addView(toSplitViewView(this.view, () => this.height), 0);
|
||||
this.emptyViews = [createEmptyView(this.style.background), createEmptyView(this.style.background)];
|
||||
const backgroundColor = this.style ? this.style.background : undefined;
|
||||
this.emptyViews = [createEmptyView(backgroundColor), createEmptyView(backgroundColor)];
|
||||
this.splitView.addView(this.emptyViews[0], this.state.leftMarginRatio * this.width, 0);
|
||||
this.splitView.addView(this.emptyViews[1], this.state.rightMarginRatio * this.width, 2);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user