mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
justify-content: center;
|
||||
transform-origin: center;
|
||||
color: inherit;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.monaco-panel-view .panel > .panel-header.expanded > .twisties::before {
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { domEvent } from 'vs/base/browser/event';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { $, append, addClass, removeClass, toggleClass, trackFocus, scheduleAtNextAnimationFrame } from 'vs/base/browser/dom';
|
||||
import { $, append, addClass, removeClass, toggleClass, trackFocus } from 'vs/base/browser/dom';
|
||||
import { firstIndex } from 'vs/base/common/arrays';
|
||||
import { Color, RGBA } from 'vs/base/common/color';
|
||||
import { SplitView, IView } from './splitview';
|
||||
@@ -58,6 +58,9 @@ export abstract class Panel extends Disposable implements IView {
|
||||
private readonly _onDidChange = this._register(new Emitter<number | undefined>());
|
||||
readonly onDidChange: Event<number | undefined> = this._onDidChange.event;
|
||||
|
||||
private readonly _onDidChangeExpansionState = this._register(new Emitter<boolean>());
|
||||
readonly onDidChangeExpansionState: Event<boolean> = this._onDidChangeExpansionState.event;
|
||||
|
||||
get draggableElement(): HTMLElement {
|
||||
return this.header;
|
||||
}
|
||||
@@ -144,6 +147,7 @@ export abstract class Panel extends Disposable implements IView {
|
||||
}, 200);
|
||||
}
|
||||
|
||||
this._onDidChangeExpansionState.fire(expanded);
|
||||
this._onDidChange.fire(expanded ? this.expandedSize : undefined);
|
||||
return true;
|
||||
}
|
||||
@@ -225,8 +229,8 @@ export abstract class Panel extends Disposable implements IView {
|
||||
this.header.setAttribute('aria-expanded', String(expanded));
|
||||
|
||||
this.header.style.color = this.styles.headerForeground ? this.styles.headerForeground.toString() : null;
|
||||
this.header.style.backgroundColor = this.styles.headerBackground ? this.styles.headerBackground.toString() : null;
|
||||
this.header.style.borderTop = this.styles.headerBorder ? `1px solid ${this.styles.headerBorder}` : null;
|
||||
this.header.style.backgroundColor = this.styles.headerBackground ? this.styles.headerBackground.toString() : '';
|
||||
this.header.style.borderTop = this.styles.headerBorder ? `1px solid ${this.styles.headerBorder}` : '';
|
||||
this._dropBackground = this.styles.dropBackground;
|
||||
}
|
||||
|
||||
@@ -336,7 +340,7 @@ class PanelDraggable extends Disposable {
|
||||
backgroundColor = (this.panel.dropBackground || PanelDraggable.DefaultDragOverBackgroundColor).toString();
|
||||
}
|
||||
|
||||
this.panel.dropTargetElement.style.backgroundColor = backgroundColor;
|
||||
this.panel.dropTargetElement.style.backgroundColor = backgroundColor || '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,13 +395,7 @@ export class PanelView extends Disposable {
|
||||
|
||||
addPanel(panel: Panel, size: number, index = this.splitview.length): void {
|
||||
const disposables = new DisposableStore();
|
||||
|
||||
// https://github.com/Microsoft/vscode/issues/59950
|
||||
let shouldAnimate = false;
|
||||
disposables.add(scheduleAtNextAnimationFrame(() => shouldAnimate = true));
|
||||
|
||||
disposables.add(Event.filter(panel.onDidChange, () => shouldAnimate)
|
||||
(this.setupAnimation, this));
|
||||
panel.onDidChangeExpansionState(this.setupAnimation, this, disposables);
|
||||
|
||||
const panelItem = { panel, disposable: disposables };
|
||||
this.panelItems.splice(index, 0, panelItem);
|
||||
|
||||
Reference in New Issue
Block a user