aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/PSMTabBarControl.m
diff options
context:
space:
mode:
authorStuart Connolly <stuart02@gmail.com>2017-03-26 23:01:20 +0100
committerStuart Connolly <stuart02@gmail.com>2017-03-26 23:01:20 +0100
commit044789b21056562bacd81fa6aafd76c091f00d69 (patch)
tree04d99f6da35b7002696626cdddb558f62538f892 /Frameworks/PSMTabBar/PSMTabBarControl.m
parent2aad505ec144b83123296c9bc4bad7c0e43753ef (diff)
downloadsequelpro-044789b21056562bacd81fa6aafd76c091f00d69.tar.gz
sequelpro-044789b21056562bacd81fa6aafd76c091f00d69.tar.bz2
sequelpro-044789b21056562bacd81fa6aafd76c091f00d69.zip
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
Diffstat (limited to 'Frameworks/PSMTabBar/PSMTabBarControl.m')
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m27
1 files changed, 4 insertions, 23 deletions
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 <PSMTabStyle> 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];
}