diff --git a/Configurations/Base.xcconfig b/Configurations/Base.xcconfig index 9b811fe..c9f7c82 100644 --- a/Configurations/Base.xcconfig +++ b/Configurations/Base.xcconfig @@ -7,4 +7,4 @@ GCC_VERSION = com.apple.compilers.llvm.clang.1_0 GCC_PREFIX_HEADER = $(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h GCC_PRECOMPILE_PREFIX_HEADER = YES CLANG_ENABLE_MODULES = YES -WARNING_CFLAGS = -Weverything -Wno-custom-atomic-properties -Wno-declaration-after-statement -Wno-direct-ivar-access -Wno-float-equal -Wno-gnu -Wno-objc-missing-property-synthesis +WARNING_CFLAGS = -Weverything -Wno-custom-atomic-properties -Wno-declaration-after-statement -Wno-direct-ivar-access -Wno-float-equal -Wno-gnu -Wno-objc-missing-property-synthesis -Wno-reserved-identifier diff --git a/MMTabBarView/MMTabBarView/MMAdiumTabStyle.m b/MMTabBarView/MMTabBarView/MMAdiumTabStyle.m index a615549..1379760 100644 --- a/MMTabBarView/MMTabBarView/MMAdiumTabStyle.m +++ b/MMTabBarView/MMTabBarView/MMAdiumTabStyle.m @@ -406,6 +406,9 @@ - (void)drawBezelOfTabBarView:(MMTabBarView *)tabBarView inRect:(NSRect)rect { alpha:1.0] set]; NSRectFill(rect); break; + + default: + break; } //Draw the border and shadow around the tab bar itself @@ -473,6 +476,9 @@ - (void)drawBezelOfTabBarView:(MMTabBarView *)tabBarView inRect:(NSRect)rect { break; } + + default: + break; } [NSGraphicsContext restoreGraphicsState]; diff --git a/MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m b/MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m index f2f6271..92c4039 100644 --- a/MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m +++ b/MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m @@ -37,7 +37,11 @@ - (instancetype)initWithFrame:(NSRect)frameRect pullsDown:(BOOL)flag { _isAnimating = NO; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + [self setBezelStyle:NSBezelStyleFlexiblePush]; +#else [self setBezelStyle:NSBezelStyleRegularSquare]; +#endif [self setBordered:NO]; [self setTitle:@""]; [self setPreferredEdge:NSMaxYEdge]; diff --git a/MMTabBarView/MMTabBarView/MMRolloverButtonCell.m b/MMTabBarView/MMTabBarView/MMRolloverButtonCell.m index 627231a..17ecded 100644 --- a/MMTabBarView/MMTabBarView/MMRolloverButtonCell.m +++ b/MMTabBarView/MMTabBarView/MMRolloverButtonCell.m @@ -59,6 +59,8 @@ - (void)setRolloverButtonType:(MMRolloverButtonType)aType { break; case MMRolloverSwitchButton: break; + default: + break; } [(NSControl *)self.controlView updateCell:self]; diff --git a/MMTabBarView/MMTabBarView/MMSierraTabStyle.m b/MMTabBarView/MMTabBarView/MMSierraTabStyle.m index e965ecf..b8d8d26 100755 --- a/MMTabBarView/MMTabBarView/MMSierraTabStyle.m +++ b/MMTabBarView/MMTabBarView/MMSierraTabStyle.m @@ -176,7 +176,11 @@ - (MMRolloverButton *)rolloverButtonWithFrame:(NSRect)frame ofTabBarView:(MMTabB - (void)updateAddButton:(MMRolloverButton *)aButton ofTabBarView:(MMTabBarView *)tabBarView { if (@available(macos 10.14, *)) { +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + aButton.bezelStyle = NSBezelStyleFlexiblePush; +#else aButton.bezelStyle = NSBezelStyleRegularSquare; +#endif } else { aButton.bordered = YES; } @@ -216,7 +220,11 @@ - (MMRolloverButton *)closeButtonForBounds:(NSRect)theRect ofTabCell:(MMTabBarBu closeButton.title=@""; closeButton.imagePosition = NSImageOnly; closeButton.rolloverButtonType = MMRolloverActionButton; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + closeButton.bezelStyle = NSBezelStyleSmallSquare; +#else closeButton.bezelStyle = NSBezelStyleShadowlessSquare; +#endif return closeButton; diff --git a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m index df32922..fd8377c 100644 --- a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m +++ b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m @@ -898,7 +898,11 @@ - (MMRolloverButton *)_closeButtonForBounds:(NSRect)theRect { [closeButton setImagePosition:NSImageOnly]; [closeButton setRolloverButtonType:MMRolloverActionButton]; [closeButton setBordered:NO]; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + [closeButton setBezelStyle:NSBezelStyleSmallSquare]; +#else [closeButton setBezelStyle:NSBezelStyleShadowlessSquare]; +#endif return closeButton; } diff --git a/MMTabBarView/MMTabBarView/MMTabBarView.m b/MMTabBarView/MMTabBarView/MMTabBarView.m index c25842e..37ef2fd 100755 --- a/MMTabBarView/MMTabBarView/MMTabBarView.m +++ b/MMTabBarView/MMTabBarView/MMTabBarView.m @@ -58,7 +58,7 @@ CGFloat noIntrinsicMetric(void) { return NSViewNoIntrinsicMetric; } else { - return NSViewNoIntrinsicMetric; + return NSViewNoInstrinsicMetric; } } @@ -255,7 +255,7 @@ - (NSSize)intrinsicContentSize #pragma mark - #pragma mark Characteristics -+ (NSBundle *)bundle; ++ (NSBundle *)bundle { static NSBundle *bundle = nil; if (!bundle) { @@ -2683,12 +2683,36 @@ - (void)_synchronizeSelection { - (NSCursor *)resizingMouseCursor { if (NSWidth(self.frame) <= self.buttonMinWidth) { +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 + if (@available(macOS 15, *)) { + return [NSCursor columnResizeCursorInDirections:NSHorizontalDirectionsRight]; + } else { + return NSCursor.resizeRightCursor; + } +#else return NSCursor.resizeRightCursor; +#endif } else if (NSWidth(self.frame) >= self.buttonMaxWidth) +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 + if (@available(macOS 15, *)) { + return [NSCursor columnResizeCursorInDirections:NSHorizontalDirectionsLeft]; + } else { + return NSCursor.resizeLeftCursor; + } +#else return NSCursor.resizeLeftCursor; +#endif else { +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 150000 + if (@available(macOS 15, *)) { + return NSCursor.columnResizeCursor; + } else { + return NSCursor.resizeLeftRightCursor; + } +#else return NSCursor.resizeLeftRightCursor; +#endif } } @@ -2796,7 +2820,11 @@ - (void)_updateAddTabButton { [_addTabButton setImagePosition:NSImageOnly]; [_addTabButton setRolloverButtonType:MMRolloverActionButton]; [_addTabButton setBordered:NO]; +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000 + [_addTabButton setBezelStyle:NSBezelStyleSmallSquare]; +#else [_addTabButton setBezelStyle:NSBezelStyleShadowlessSquare]; +#endif if (_style && [_style respondsToSelector:@selector(updateAddButton:ofTabBarView:)]) [_style updateAddButton:_addTabButton ofTabBarView:self];