src/vs/workbench/browser/parts/titlebar/titlebarPart.ts/TitlebarPart/updateLayout
class TitlebarPart:	updateLayout(dimension: Dimension): void {
		this.lastLayoutDimensions = dimension;

		if (getTitleBarStyle(this.configurationService) === 'custom') {
			// Prevent zooming behavior if any of the following conditions are met:
			// 1. Native macOS
			// 2. Menubar is hidden
			// 3. Shrinking below the window control size (zoom < 1)
			const zoomFactor = getZoomFactor();
			this.element.style.setProperty('--zoom-factor', zoomFactor.toString());
			this.rootContainer.classList.toggle('counter-zoom', zoomFactor < 1 || (!isWeb && isMacintosh) || this.currentMenubarVisibility === 'hidden');

			runAtThisOrScheduleAtNextAnimationFrame(() => this.adjustTitleMarginToCenter());

			if (this.customMenubar) {
				const menubarDimension = new Dimension(0, dimension.height);
				this.customMenubar.layout(menubarDimension);
			}
		}
	}