Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Configurations/Base.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions MMTabBarView/MMTabBarView/MMAdiumTabStyle.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -473,6 +476,9 @@ - (void)drawBezelOfTabBarView:(MMTabBarView *)tabBarView inRect:(NSRect)rect {

break;
}

default:
break;
}

[NSGraphicsContext restoreGraphicsState];
Expand Down
4 changes: 4 additions & 0 deletions MMTabBarView/MMTabBarView/MMOverflowPopUpButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 2 additions & 0 deletions MMTabBarView/MMTabBarView/MMRolloverButtonCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ - (void)setRolloverButtonType:(MMRolloverButtonType)aType {
break;
case MMRolloverSwitchButton:
break;
default:
break;
}

[(NSControl *)self.controlView updateCell:self];
Expand Down
8 changes: 8 additions & 0 deletions MMTabBarView/MMTabBarView/MMSierraTabStyle.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions MMTabBarView/MMTabBarView/MMTabBarButtonCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
32 changes: 30 additions & 2 deletions MMTabBarView/MMTabBarView/MMTabBarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CGFloat noIntrinsicMetric(void) {
return NSViewNoIntrinsicMetric;
}
else {
return NSViewNoIntrinsicMetric;
return NSViewNoInstrinsicMetric;
}
}

Expand Down Expand Up @@ -255,7 +255,7 @@ - (NSSize)intrinsicContentSize
#pragma mark -
#pragma mark Characteristics

+ (NSBundle *)bundle;
+ (NSBundle *)bundle
{
static NSBundle *bundle = nil;
if (!bundle) {
Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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];
Expand Down