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

Adapt height (fixes #84734)

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