mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
fix: trafficLightPosition incorrect with customButtonsOnHover (#48538)
fix: trafficLightPosition incorrect with customButtonsOnHover
This commit is contained in:
@@ -176,6 +176,13 @@
|
||||
[button setHidden:hidden];
|
||||
[button setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
// On macOS 26, toggling the hidden state of the standard window buttons can
|
||||
// cause AppKit to re-layout the title bar container and reset its frame,
|
||||
// which loses the custom margin adjustments. Re-apply the calculated geometry
|
||||
// after visibility changes to keep the buttons at the specified margin
|
||||
// instead of snapping back to the default until the next manual resize.
|
||||
[self redraw];
|
||||
}
|
||||
|
||||
// Return the bounds of all 3 buttons.
|
||||
|
||||
Reference in New Issue
Block a user