Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 28b07b8

Browse files
authoredMay 25, 2024
Fix menu computation when compact on right side (#213459)
fix menu computation when compact on right side
1 parent 2188b46 commit 28b07b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/vs/base/browser/ui/menu/menubar.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1010,8 +1010,8 @@ export class MenuBar extends Disposable {
10101010
if (this.options.compactMode?.horizontal === HorizontalDirection.Right) {
10111011
menuHolder.style.left = `${titleBoundingRect.left + this.container.clientWidth}px`;
10121012
} else if (this.options.compactMode?.horizontal === HorizontalDirection.Left) {
1013-
menuHolder.style.top = `${titleBoundingRect.top}px`;
1014-
menuHolder.style.right = `${this.container.clientWidth}px`;
1013+
const windowWidth = DOM.getWindow(this.container).innerWidth;
1014+
menuHolder.style.right = `${windowWidth - titleBoundingRect.left}px`;
10151015
menuHolder.style.left = 'auto';
10161016
} else {
10171017
menuHolder.style.left = `${titleBoundingRect.left * titleBoundingRectZoom}px`;

0 commit comments

Comments
 (0)
This repository has been archived.