mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
Use items width to compute overflow
This commit is contained in:
parent
b21e8d48fb
commit
6bf56c43e1
3 changed files with 9 additions and 10 deletions
|
@ -97,6 +97,14 @@ export class ToolBar {
|
|||
return this.actionBar.getContainer();
|
||||
}
|
||||
|
||||
public getItemsWidth(): number {
|
||||
let itemsWidth = 0;
|
||||
for (let i = 0; i < this.actionBar.length(); i++) {
|
||||
itemsWidth += this.actionBar.getWidth(i);
|
||||
}
|
||||
return itemsWidth;
|
||||
}
|
||||
|
||||
public setAriaLabel(label: string): void {
|
||||
this.actionBar.setAriaLabel(label);
|
||||
}
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
border-left-style: solid;
|
||||
}
|
||||
|
||||
.monaco-workbench > .part.panel > .composite.title > .title-actions {
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.monaco-workbench > .part.panel > .title > .title-actions .monaco-action-bar .action-item .action-label {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
|||
private blockOpeningPanel: boolean;
|
||||
private compositeBar: CompositeBar;
|
||||
private dimension: Dimension;
|
||||
private toolbarWidth = new Map<string, number>();
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
@ -258,11 +257,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
|||
if (!activePanel) {
|
||||
return 0;
|
||||
}
|
||||
if (!this.toolbarWidth.has(activePanel.getId())) {
|
||||
this.toolbarWidth.set(activePanel.getId(), this.toolBar.getContainer().offsetWidth);
|
||||
}
|
||||
|
||||
return this.toolbarWidth.get(activePanel.getId());
|
||||
return this.toolBar.getItemsWidth();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue