diff --git a/packages/app/src/shell/sidebar-toggle.tsx b/packages/app/src/shell/sidebar-toggle.tsx index 40c1e6efac0..231ce1e0f2c 100644 --- a/packages/app/src/shell/sidebar-toggle.tsx +++ b/packages/app/src/shell/sidebar-toggle.tsx @@ -41,7 +41,7 @@ export function macVerticalTrafficLights(zoom: number) { return { x, y, width: x + macTrafficLightsBaseWidth - 14 } } -const macTrafficLightsGap = 10 +const macTrafficLightsGap = 14 // The toggle's 28px plus a 4px gap before the header contents. const slotWidth = 32 diff --git a/packages/app/src/shell/traffic-lights-notch.test.ts b/packages/app/src/shell/traffic-lights-notch.test.ts index 74e5d26e4e5..0f278d020b6 100644 --- a/packages/app/src/shell/traffic-lights-notch.test.ts +++ b/packages/app/src/shell/traffic-lights-notch.test.ts @@ -3,16 +3,16 @@ import { trafficLightsPocket } from "./traffic-lights-notch" it("bends the closed sidebar's content panel around the traffic lights, its corner concentric with the zoom button", () => { // The buttons span 20–80px across and 25–39px down at 1x. - expect(trafficLightsPocket(0, 1)).toEqual({ left: 8, right: 86, bottom: 45, top: 8, outer: 10, inner: 13 }) + expect(trafficLightsPocket(0, 1)).toEqual({ left: 8, right: 90, bottom: 49, top: 8, outer: 10, inner: 17 }) }) it("flattens the bend into the panel's own corner as the panel's edge reaches the pocket's", () => { const pocket = trafficLightsPocket(70, 1) - expect(pocket?.outer).toBeCloseTo(10 * (8 / 23), 5) - expect(pocket?.inner).toBeCloseTo(13 * (8 / 23), 5) - expect(trafficLightsPocket(77.99, 1)?.outer).toBeCloseTo(0, 2) - expect(trafficLightsPocket(78, 1)).toBeUndefined() + expect(pocket?.outer).toBeCloseTo(10 * (12 / 27), 5) + expect(pocket?.inner).toBeCloseTo(17 * (12 / 27), 5) + expect(trafficLightsPocket(81.99, 1)?.outer).toBeCloseTo(0, 2) + expect(trafficLightsPocket(82, 1)).toBeUndefined() expect(trafficLightsPocket(240, 1)).toBeUndefined() }) @@ -20,7 +20,7 @@ it("stays concentric with the zoom button, which keeps its native size, under re const pocket = trafficLightsPocket(0, 2) // At 2x the buttons are 7px across on an 11.5px pitch, the first still centered 27px across and 32px down. - expect(pocket?.inner).toBe(9.5) + expect(pocket?.inner).toBe(13.5) expect(pocket && pocket.right - pocket.inner).toBe(27 + 2 * 11.5) expect(pocket && pocket.bottom - pocket.inner).toBe(32) }) diff --git a/packages/app/src/shell/traffic-lights-notch.tsx b/packages/app/src/shell/traffic-lights-notch.tsx index 80506593452..90281344888 100644 --- a/packages/app/src/shell/traffic-lights-notch.tsx +++ b/packages/app/src/shell/traffic-lights-notch.tsx @@ -6,7 +6,7 @@ const panelRadius = 10 const panelInset = 8 // Room between the traffic lights and the pocket the panel bends around them. -const pocketPadding = 6 +const pocketPadding = 10 // The native buttons' size in points; they keep it at every renderer zoom. const trafficLightSize = 14