diff options
author | rowanbeentje <rowan@beent.je> | 2011-08-16 00:07:03 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-08-16 00:07:03 +0000 |
commit | 22f2e47959158cf33704481353a65b6d3b242b88 (patch) | |
tree | fdccf10fefb43197065f028017e77cd83b51ab85 /Frameworks/PSMTabBar/Styles | |
parent | aee5bc25beb877fb6484031c087b4f93096394eb (diff) | |
download | sequelpro-22f2e47959158cf33704481353a65b6d3b242b88.tar.gz sequelpro-22f2e47959158cf33704481353a65b6d3b242b88.tar.bz2 sequelpro-22f2e47959158cf33704481353a65b6d3b242b88.zip |
- Lion compatibility improvement: add support for fullscreen windows, on the main window only; hide SSH/SSL status when entering fullscreen mode, to prevent drawing issues
- Lion compatibility improvement: update tab colours under 10.7 to match system styles
- Lion compatibility improvement: fix issues dragging tabs out of windows and into other tab bars
- Lion compatibility improvement: fix QuickLook issues under 10.7, including windows which couldn't be closed, fullscreened, or crashes
- Fix exceptions in the bundle controller when using tab switching keys
- Lion compatibility improvement: use overlay scrollers where possible
Diffstat (limited to 'Frameworks/PSMTabBar/Styles')
-rw-r--r-- | Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h | 2 | ||||
-rw-r--r-- | Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h index d7ab9a56..599bc492 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.h @@ -26,6 +26,8 @@ #import "PSMTabStyle.h" @interface PSMSequelProTabStyle : NSObject <PSMTabStyle> { + SInt32 systemVersion; + NSImage *sequelProCloseButton; NSImage *sequelProCloseButtonDown; NSImage *sequelProCloseButtonOver; diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index ece10a76..05c4ada2 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -46,6 +46,9 @@ - (id) init { if ( (self = [super init]) ) { + systemVersion = 0; + Gestalt(gestaltSystemVersion, &systemVersion); + sequelProCloseButton = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"SequelProTabClose"]]; sequelProCloseButtonDown = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"SequelProTabClose_Pressed"]]; sequelProCloseButtonOver = [[NSImage alloc] initByReferencingFile:[[PSMTabBarControl bundle] pathForImageResource:@"SequelProTabClose_Rollover"]]; @@ -405,12 +408,15 @@ [[NSGraphicsContext currentContext] setShouldAntialias:NO]; float backgroundCalibratedWhite = 0.495f; + if (systemVersion >= 0x1070) backgroundCalibratedWhite = 0.55f; + float lineCalibratedWhite = [[NSColor darkGrayColor] whiteComponent]; float shadowAlpha = 0.4f; // When the window is in the background, tone down the colours if (![[tabBar window] isMainWindow] || ![NSApp isActive]) { backgroundCalibratedWhite = 0.73f; + if (systemVersion >= 0x1070) backgroundCalibratedWhite = 0.79f; lineCalibratedWhite = 0.49f; shadowAlpha = 0.3f; } @@ -502,19 +508,19 @@ if ([[tabBar window] isMainWindow] && [NSApp isActive]) { lineColor = [NSColor darkGrayColor]; if ([cell state] == NSOnState) { - fillColor = [NSColor colorWithCalibratedWhite:0.59f alpha:1.0f]; + fillColor = [NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070)?0.63f:0.59f alpha:1.0f]; shadowColor = [NSColor colorWithCalibratedWhite:0.0f alpha:0.7f]; } else { - fillColor = [NSColor colorWithCalibratedWhite:0.495f alpha:1.0f]; + fillColor = [NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070)?0.55f:0.495f alpha:1.0f]; shadowColor = [NSColor colorWithCalibratedWhite:0.0f alpha:1.0f]; } } else { lineColor = [NSColor colorWithCalibratedWhite:0.49f alpha:1.0f]; if ([cell state] == NSOnState) { - fillColor = [NSColor colorWithCalibratedWhite:0.81f alpha:1.0f]; + fillColor = [NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070)?0.85f:0.81f alpha:1.0f]; shadowColor = [NSColor colorWithCalibratedWhite:0.0f alpha:0.4f]; } else { - fillColor = [NSColor colorWithCalibratedWhite:0.73f alpha:1.0f]; + fillColor = [NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070)?0.79f:0.73f alpha:1.0f]; shadowColor = [NSColor colorWithCalibratedWhite:0.0f alpha:0.7f]; } } |