diff --git a/patches/helium/ui/fix-caption-bounds.patch b/patches/helium/ui/fix-caption-bounds.patch new file mode 100644 index 00000000..447b18fc --- /dev/null +++ b/patches/helium/ui/fix-caption-bounds.patch @@ -0,0 +1,44 @@ +--- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm ++++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm +@@ -63,13 +63,10 @@ const double kThinControllerHeight = 0.5 + } + + - (CGFloat)_minXTitlebarWidgetInset { +- if (@available(macOS 26, *)) { +- // On macOS 26, position the leading window widget the same distance from +- // the leading edge of the window as it is from the top of the window. That +- // way the window corner can be adjusted to make the widget concentric. +- return 13.0; +- } +- return [super _minXTitlebarWidgetInset]; ++ // Both macOS 15- and macOS 26+ use the same inset here, but ++ // 1px is invisible on macOS 15- for some reason. Ideally it should be 11px here, ++ // but since it appears visually to be 11, we just use 10 here for both styles. ++ return 10.0; + } + + // Override -_getCachedWindowCornerRadius rather than -_cornerRadius because the +@@ -78,7 +75,7 @@ const double kThinControllerHeight = 0.5 + // _getCachedWindowCornerRadius. + - (CGFloat)_getCachedWindowCornerRadius { + if (@available(macOS 26, *)) { +- return 13.0 /* widget position from top and left */ + ++ return 10.0 /* widget position from top and left */ + + 7.0 /* widget radius */; + } + // Don't mess with the window radius before macOS 26, as concentricity was not +--- a/chrome/browser/ui/views/frame/browser_frame_view_mac.mm ++++ b/chrome/browser/ui/views/frame/browser_frame_view_mac.mm +@@ -465,10 +465,10 @@ BrowserFrameViewMac::GetCaptionButtonBou + // not precise. + if (@available(macOS 26, *)) { + result.bounds = gfx::RectF(12, 10, 62, 18); +- result.margins = gfx::OutsetsF::VH(10, 12); ++ result.margins = gfx::OutsetsF::VH(0, 6); + } else { + result.bounds = gfx::RectF(20, 11, 54, 16); +- result.margins = gfx::OutsetsF::VH(11, 20); ++ result.margins = gfx::OutsetsF::VH(0, 14); + } + + // Mirror for when caption buttons are on the "wrong" side. diff --git a/patches/series b/patches/series index 698c4028..9120bb4a 100644 --- a/patches/series +++ b/patches/series @@ -266,6 +266,7 @@ helium/ui/ublock-show-in-settings.patch helium/ui/licenses-in-credits.patch helium/ui/remove-autofill-link-to-password-manager.patch helium/ui/fix-caption-button-tab-strip-align.patch +helium/ui/fix-caption-bounds.patch helium/ui/find-bar.patch helium/ui/remove-zoom-action.patch helium/ui/experiments/compact-action-toolbar.patch