提交 46a5e628 编写于 作者: C Christof Marti

Adapt height (fixes #84734)

上级 687e276d
......@@ -895,6 +895,7 @@ export class QuickInputService extends Component implements IQuickInputService {
private idPrefix = 'quickInput_'; // Constant since there is still only one.
private ui: QuickInputUI | undefined;
private dimension?: dom.Dimension;
private comboboxAccessibility = false;
private enabled = true;
private inQuickOpenWidgets: Record<string, boolean> = {};
......@@ -1498,6 +1499,7 @@ export class QuickInputService extends Component implements IQuickInputService {
}
layout(dimension: dom.Dimension): void {
this.dimension = dimension;
this.updateLayout();
}
......@@ -1512,7 +1514,7 @@ export class QuickInputService extends Component implements IQuickInputService {
style.marginLeft = '-' + (width / 2) + 'px';
this.ui.inputBox.layout();
this.ui.list.layout();
this.ui.list.layout(this.dimension && this.dimension.height * 0.6);
}
}
......
......@@ -468,7 +468,8 @@ export class QuickInputList {
this.list.domFocus();
}
layout(): void {
layout(maxHeight?: number): void {
this.list.getHTMLElement().style.maxHeight = maxHeight ? `calc(${Math.floor(maxHeight / 44) * 44}px)` : '';
this.list.layout();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册