Skip to content

Commit

Permalink
Panel layout: take into account the 1px border when layouting
Browse files Browse the repository at this point in the history
fixes #37262
  • Loading branch information
isidorn committed Nov 1, 2017
1 parent d38d64d commit 5ac8902
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/vs/workbench/browser/parts/panel/panelPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { IPanel } from 'vs/workbench/common/panel';
import { CompositePart, ICompositeTitleLabel } from 'vs/workbench/browser/parts/compositePart';
import { Panel, PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel';
import { IPanelService, IPanelIdentifier } from 'vs/workbench/services/panel/common/panelService';
import { IPartService, Parts } from 'vs/workbench/services/part/common/partService';
import { IPartService, Parts, Position } from 'vs/workbench/services/part/common/partService';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IMessageService } from 'vs/platform/message/common/message';
Expand Down Expand Up @@ -214,9 +214,13 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {

public layout(dimension: Dimension): Dimension[] {

// Pass to super
const sizes = super.layout(dimension);
this.dimension = dimension;
if (this.partService.getPanelPosition() === Position.RIGHT) {
// Take into account the 1px border when layouting
this.dimension = new Dimension(dimension.width - 1, dimension.height);
} else {
this.dimension = dimension;
}
const sizes = super.layout(this.dimension);
this.layoutCompositeBar();

return sizes;
Expand Down

0 comments on commit 5ac8902

Please sign in to comment.