From 044789b21056562bacd81fa6aafd76c091f00d69 Mon Sep 17 00:00:00 2001 From: Stuart Connolly Date: Sun, 26 Mar 2017 23:01:20 +0100 Subject: Update tab view drawing to match the style used by 10.12's automatic tabs and remove unused tab styles. Issues still to address: - Add tab button does not darken when moused over - The tab overflow button is being clipped and the image is not high res --- Frameworks/PSMTabBar/PSMTabBarControl.m | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'Frameworks/PSMTabBar/PSMTabBarControl.m') diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index 18b5a296..3e3c1e30 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -11,11 +11,6 @@ #import "PSMOverflowPopUpButton.h" #import "PSMRolloverButton.h" #import "PSMTabStyle.h" -#import "PSMMetalTabStyle.h" -#import "PSMAquaTabStyle.h" -#import "PSMUnifiedTabStyle.h" -#import "PSMCardTabStyle.h" -#import "PSMAdiumTabStyle.h" #import "PSMSequelProTabStyle.h" #import "PSMTabDragAssistant.h" #import "PSMTabBarController.h" @@ -161,6 +156,7 @@ // new tab button NSRect addTabButtonRect = NSMakeRect([self frame].size.width - [style rightMarginForTabBarControl] + 1, 3.0f, 16.0f, 16.0f); _addTabButton = [[PSMRolloverButton alloc] initWithFrame:addTabButtonRect]; + if (_addTabButton) { NSImage *newButtonImage = [style addTabButtonImage]; if (newButtonImage) { @@ -369,31 +365,16 @@ - (void)setStyleNamed:(NSString *)name { id newStyle; - -/* if ([name isEqualToString:@"Aqua"]) { - newStyle = [[PSMAquaTabStyle alloc] init]; - - } else if ([name isEqualToString:@"Unified"]) { - newStyle = [[PSMUnifiedTabStyle alloc] init]; - - } else if ([name isEqualToString:@"Adium"]) { - newStyle = [[PSMAdiumTabStyle alloc] init]; - - } else if ([name isEqualToString:@"Card"]) { - newStyle = [[PSMCardTabStyle alloc] init]; - - } else if ([name isEqualToString:@"Metal"]) { - newStyle = [[PSMMetalTabStyle alloc] init]; - } else */ if ([name isEqualToString:@"SequelPro"]) { newStyle = [[PSMSequelProTabStyle alloc] init]; - - } else { + } + else { newStyle = [[PSMSequelProTabStyle alloc] init]; } [self setStyle:newStyle]; + [newStyle release]; } -- cgit v1.2.3