From 6d6aafe887be3e2cc49e315bb01845f8ce3eadc1 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 11 Jul 2025 14:46:16 +0300 Subject: [PATCH] Fix scrolling view in newer macOS versions --- Cocoa/GBImageView.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cocoa/GBImageView.m b/Cocoa/GBImageView.m index c496d9667..835f05dcc 100644 --- a/Cocoa/GBImageView.m +++ b/Cocoa/GBImageView.m @@ -44,7 +44,8 @@ } if (parent.displayScrollRect) { - NSBezierPath *path = [NSBezierPath bezierPathWithRect:CGRectInfinite]; + // CGRectInfinite in NSBezierPath is broken in newer macOS versions + NSBezierPath *path = [NSBezierPath bezierPathWithRect:CGRectMake(-0x4000, -0x4000, 0x8000, 0x8000)]; for (unsigned x = 0; x < 2; x++) { for (unsigned y = 0; y < 2; y++) { NSRect rect = parent.scrollRect;