diff --git a/Cocoa/Document.xib b/Cocoa/Document.xib index db6e96c..d0ae7f9 100644 --- a/Cocoa/Document.xib +++ b/Cocoa/Document.xib @@ -406,13 +406,9 @@ - + - - - - @@ -426,13 +422,9 @@ - + - - - - diff --git a/Cocoa/GBToolbarFieldCell.m b/Cocoa/GBToolbarFieldCell.m index a58e9d3..b28488d 100644 --- a/Cocoa/GBToolbarFieldCell.m +++ b/Cocoa/GBToolbarFieldCell.m @@ -20,4 +20,13 @@ method_setImplementation(class_getInstanceMethod([GBToolbarFieldCell class], _cmd), imp); ((void(*)(id, SEL, id))imp)(self, _cmd, textObj); } + +// We only need this hack on Solarium, avoid regressions ++ (instancetype)allocWithZone:(struct _NSZone *)zone +{ + if (@available(macOS 26.0, *)) { + return [super allocWithZone:zone]; + } + return (id)[NSTextFieldCell allocWithZone:zone]; +} @end diff --git a/Cocoa/NSTextFieldCell+Inset.m b/Cocoa/NSTextFieldCell+Inset.m index 8d5aea6..79c0008 100644 --- a/Cocoa/NSTextFieldCell+Inset.m +++ b/Cocoa/NSTextFieldCell+Inset.m @@ -66,7 +66,11 @@ + (void)load { - method_exchangeImplementations(class_getInstanceMethod(self, @selector(wantsUpdateLayer)), + Method method = class_getInstanceMethod(self, @selector(wantsUpdateLayer)); + if (class_addMethod(self, @selector(wantsUpdateLayer), method_getImplementation(method), method_getTypeEncoding(method))) { + method = class_getInstanceMethod(self, @selector(wantsUpdateLayer)); + } + method_exchangeImplementations(method, class_getInstanceMethod(self, @selector(wantsUpdateLayerHook))); }