Skip to content

Commit

Permalink
Fix menu computation when compact on right side (microsoft#213459)
Browse files Browse the repository at this point in the history
fix menu computation when compact on right side
  • Loading branch information
benibenj authored and andremmsilva committed May 26, 2024
1 parent 96a843d commit e699ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/menu/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@ export class MenuBar extends Disposable {
if (this.options.compactMode?.horizontal === HorizontalDirection.Right) {
menuHolder.style.left = `${titleBoundingRect.left + this.container.clientWidth}px`;
} else if (this.options.compactMode?.horizontal === HorizontalDirection.Left) {
menuHolder.style.top = `${titleBoundingRect.top}px`;
menuHolder.style.right = `${this.container.clientWidth}px`;
const windowWidth = DOM.getWindow(this.container).innerWidth;
menuHolder.style.right = `${windowWidth - titleBoundingRect.left}px`;
menuHolder.style.left = 'auto';
} else {
menuHolder.style.left = `${titleBoundingRect.left * titleBoundingRectZoom}px`;
Expand Down

0 comments on commit e699ef2

Please sign in to comment.