mirror of
https://github.com/Microsoft/vscode
synced 2024-07-17 02:57:19 +00:00
Increase activity bar space at top and bottom (#207262)
Give more space to activity bar when top / bottom
This commit is contained in:
parent
0a82e795ab
commit
12fc36731b
|
@ -35,8 +35,7 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.monaco-workbench .part > .title,
|
||||
.monaco-workbench .part > .header-or-footer {
|
||||
.monaco-workbench .part > .title {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
}
|
||||
|
||||
.monaco-workbench .pane-composite-part > .header-or-footer {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
background-color: var(--vscode-activityBarTop-background);
|
||||
}
|
||||
|
||||
|
|
|
@ -545,7 +545,8 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos
|
|||
|
||||
private layoutCompositeBar(): void {
|
||||
if (this.contentDimension && this.dimension && this.paneCompositeBar.value) {
|
||||
let availableWidth = this.contentDimension.width - 16; // take padding into account
|
||||
const padding = this.compositeBarPosition === CompositeBarPosition.TITLE ? 16 : 8;
|
||||
let availableWidth = this.contentDimension.width - padding;
|
||||
availableWidth = Math.max(AbstractPaneCompositePart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth());
|
||||
this.paneCompositeBar.value.layout(availableWidth, this.dimension.height);
|
||||
}
|
||||
|
@ -578,7 +579,7 @@ export abstract class AbstractPaneCompositePart extends CompositePart<PaneCompos
|
|||
// Each toolbar item has 4px margin in the panel toolbar
|
||||
const toolBarWidth = this.toolBar.getItemsWidth() + this.toolBar.getItemsLength() * 4;
|
||||
const globalToolBarWidth = this.globalToolBar ? this.globalToolBar.getItemsWidth() + this.globalToolBar.getItemsLength() * 4 : 0;
|
||||
return 5 + toolBarWidth + globalToolBarWidth; // 5px toolBar padding-left
|
||||
return toolBarWidth + globalToolBarWidth;
|
||||
}
|
||||
|
||||
private onTitleAreaContextMenu(event: StandardMouseEvent): void {
|
||||
|
|
|
@ -163,6 +163,10 @@ export class PanelPart extends AbstractPaneCompositePart {
|
|||
]);
|
||||
}
|
||||
|
||||
protected override getToolbarWidth(): number {
|
||||
return super.getToolbarWidth() + 5; // 5px toolBar padding-left
|
||||
}
|
||||
|
||||
override layout(width: number, height: number, top: number, left: number): void {
|
||||
let dimensions: Dimension;
|
||||
if (this.layoutService.getPanelPosition() === Position.RIGHT) {
|
||||
|
|
Loading…
Reference in a new issue