提交 757bf29c 编写于 作者: I isidor

composite bar fix min width issue

上级 42e690c8
......@@ -24,7 +24,7 @@ const MIN_SIDEBAR_PART_WIDTH = 170;
const MIN_EDITOR_PART_HEIGHT = 70;
const MIN_EDITOR_PART_WIDTH = 220;
const MIN_PANEL_PART_HEIGHT = 77;
const MIN_PANEL_PART_WIDTH = 150;
const MIN_PANEL_PART_WIDTH = 220;
const DEFAULT_PANEL_SIZE_COEFFICIENT = 0.4;
const HIDE_SIDEBAR_WIDTH_THRESHOLD = 50;
const HIDE_PANEL_HEIGHT_THRESHOLD = 50;
......
......@@ -281,7 +281,7 @@ export class CompositeBar implements ICompositeBar {
}
// Add overflow action as needed
if (visibleCompositesChange && overflows) {
if ((visibleCompositesChange && overflows) || this.compositeSwitcherBar.length() === 0) {
this.compositeOverflowAction = this.instantiationService.createInstance(CompositeOverflowActivityAction, () => this.compositeOverflowActionItem.showMenu());
this.compositeOverflowActionItem = this.instantiationService.createInstance(
CompositeOverflowActivityActionItem,
......
......@@ -36,6 +36,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
public static activePanelSettingsKey = 'workbench.panelpart.activepanelid';
private static readonly PINNED_PANELS = 'workbench.panel.pinnedPanels';
private static readonly MIN_COMPOSITE_BAR_WIDTH = 50;
public _serviceBrand: any;
......@@ -225,7 +226,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
let availableWidth = this.dimension.width - 8; // take padding into account
if (this.toolBar) {
// adjust height for global actions showing
availableWidth -= this.toolBar.getContainer().getHTMLElement().offsetWidth;
availableWidth = Math.max(PanelPart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.toolBar.getContainer().getHTMLElement().offsetWidth);
}
this.compositeBar.layout(new Dimension(availableWidth, this.dimension.height));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册