From 731f5a248d35f8e3f2d848d89a36d71e0881f7de Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Thu, 9 Feb 2023 14:39:37 -0500 Subject: [PATCH] Fix OVERIDDEN macro, override method in NSCollectionViewGridLayout --- Source/NSCollectionView.m | 2 +- Source/NSCollectionViewGridLayout.m | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/NSCollectionView.m b/Source/NSCollectionView.m index dbad9aeb2..49f407888 100644 --- a/Source/NSCollectionView.m +++ b/Source/NSCollectionView.m @@ -69,7 +69,7 @@ APPKIT_DECLARE NSCollectionViewSupplementaryElementKind GSNoSupplementaryElement * Private helper macro to check, if the method given via the selector sel * has been overridden in the current subclass. */ -#define OVERRIDDEN(sel) ([_collectionViewLayout methodForSelector: @selector(sel)] != [[_collectionViewLayout class] instanceMethodForSelector: @selector(sel)]) +#define OVERRIDDEN(sel) ([_collectionViewLayout methodForSelector: @selector(sel)] != [[NSCollectionViewLayout class] instanceMethodForSelector: @selector(sel)]) /* * Class variables diff --git a/Source/NSCollectionViewGridLayout.m b/Source/NSCollectionViewGridLayout.m index fb7327ef2..c1728fd4c 100644 --- a/Source/NSCollectionViewGridLayout.m +++ b/Source/NSCollectionViewGridLayout.m @@ -263,4 +263,9 @@ return attrs; } +- (NSSize) collectionViewContentSize +{ + return [_collectionView frame].size; +} + @end