diff options
author | rowanbeentje <rowan@beent.je> | 2012-12-13 00:14:06 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-12-13 00:14:06 +0000 |
commit | 3b5642c68f57865888b60a1f846fed3810333dae (patch) | |
tree | 8d76fa2dda27594b369421cb5099b5b8dd8726c6 /Frameworks | |
parent | 9c0184ce97a1e158d926afb8e4be034c61999563 (diff) | |
download | sequelpro-3b5642c68f57865888b60a1f846fed3810333dae.tar.gz sequelpro-3b5642c68f57865888b60a1f846fed3810333dae.tar.bz2 sequelpro-3b5642c68f57865888b60a1f846fed3810333dae.zip |
- Add Retina versions of the tab close buttons
- Recompress other PSMTabBar images where necessary
- Improve drawing of the tab bar in response to window state change, allowing better colour display in edge cases and particularly when sheets are open
Diffstat (limited to 'Frameworks')
39 files changed, 14 insertions, 10 deletions
diff --git a/Frameworks/PSMTabBar/Images/AddTabButton.png b/Frameworks/PSMTabBar/Images/AddTabButton.png Binary files differindex 0ed2bc26..3818b106 100644 --- a/Frameworks/PSMTabBar/Images/AddTabButton.png +++ b/Frameworks/PSMTabBar/Images/AddTabButton.png diff --git a/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png b/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png Binary files differindex 9f370a0d..d78febb1 100644 --- a/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png +++ b/Frameworks/PSMTabBar/Images/AddTabButtonPushed.png diff --git a/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png b/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png Binary files differindex 6138f3ed..ced6a993 100644 --- a/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png +++ b/Frameworks/PSMTabBar/Images/AddTabButtonRollover.png diff --git a/Frameworks/PSMTabBar/Images/AdiumGradient.png b/Frameworks/PSMTabBar/Images/AdiumGradient.png Binary files differindex d410a88a..bad81b86 100644 --- a/Frameworks/PSMTabBar/Images/AdiumGradient.png +++ b/Frameworks/PSMTabBar/Images/AdiumGradient.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png Binary files differindex 77d22050..82c37150 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png +++ b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png Binary files differindex 197ea95c..01570fbd 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png +++ b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png Binary files differindex 2dfe5777..55db6531 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png +++ b/Frameworks/PSMTabBar/Images/AquaTabCloseDirty_Front_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png Binary files differindex 02b72d39..17c88d3d 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png +++ b/Frameworks/PSMTabBar/Images/AquaTabClose_Front.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png Binary files differindex f81125a0..8050f582 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png +++ b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png Binary files differindex 4f6b865f..3612b28e 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png +++ b/Frameworks/PSMTabBar/Images/AquaTabClose_Front_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabsBackground.png b/Frameworks/PSMTabBar/Images/AquaTabsBackground.png Binary files differindex b9cd1d0f..1303779f 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabsBackground.png +++ b/Frameworks/PSMTabBar/Images/AquaTabsBackground.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabsDown.png b/Frameworks/PSMTabBar/Images/AquaTabsDown.png Binary files differindex 6fed84c6..65f3ccb9 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabsDown.png +++ b/Frameworks/PSMTabBar/Images/AquaTabsDown.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png b/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png Binary files differindex df2c1365..96e54aec 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png +++ b/Frameworks/PSMTabBar/Images/AquaTabsDownNonKey.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png b/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png Binary files differindex be82692d..60f38a21 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png +++ b/Frameworks/PSMTabBar/Images/AquaTabsSeparator.png diff --git a/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png b/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png Binary files differindex 72b7878b..5f40dfc2 100644 --- a/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png +++ b/Frameworks/PSMTabBar/Images/AquaTabsSeparatorDown.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose.png b/Frameworks/PSMTabBar/Images/SequelProTabClose.png Binary files differindex 442f1fdf..1b68f75f 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabClose.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png Binary files differnew file mode 100644 index 00000000..da429832 --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose@2x.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png Binary files differindex 61c786dc..520cfb0b 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png Binary files differnew file mode 100644 index 00000000..a81b9b4b --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose_Pressed@2x.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png Binary files differindex 6744b7fc..9ee43e19 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png Binary files differnew file mode 100644 index 00000000..dcc764d5 --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabClose_Rollover@2x.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty.png Binary files differindex b9bb0595..e5269d34 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabDirty.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png Binary files differnew file mode 100644 index 00000000..0b2c0796 --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty@2x.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png Binary files differindex 5d113e50..ed074ef9 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png Binary files differnew file mode 100644 index 00000000..14e5b566 --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Pressed@2x.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png Binary files differindex 031dffad..7966b7e9 100644 --- a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png Binary files differnew file mode 100644 index 00000000..bff7efac --- /dev/null +++ b/Frameworks/PSMTabBar/Images/SequelProTabDirty_Rollover@2x.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty.png Binary files differindex 60a25ba3..5899b737 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Dirty.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Dirty.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png Binary files differindex 978dc1c7..eb286a01 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png Binary files differindex 7b8924da..599d4753 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Dirty_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front.png b/Frameworks/PSMTabBar/Images/TabClose_Front.png Binary files differindex e7bf88e7..192b6991 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Front.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Front.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png b/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png Binary files differindex feaf7281..68ebd583 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Front_Pressed.png diff --git a/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png b/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png Binary files differindex 865bd1fb..ce45746e 100644 --- a/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png +++ b/Frameworks/PSMTabBar/Images/TabClose_Front_Rollover.png diff --git a/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png b/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png Binary files differindex b1308164..208c9640 100644 --- a/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png +++ b/Frameworks/PSMTabBar/Images/TabNewMetalRollover.png diff --git a/Frameworks/PSMTabBar/Images/overflowImage.png b/Frameworks/PSMTabBar/Images/overflowImage.png Binary files differindex 2b762555..4cf35e4e 100644 --- a/Frameworks/PSMTabBar/Images/overflowImage.png +++ b/Frameworks/PSMTabBar/Images/overflowImage.png diff --git a/Frameworks/PSMTabBar/Images/overflowImagePressed.png b/Frameworks/PSMTabBar/Images/overflowImagePressed.png Binary files differindex b3918b34..f6916837 100644 --- a/Frameworks/PSMTabBar/Images/overflowImagePressed.png +++ b/Frameworks/PSMTabBar/Images/overflowImagePressed.png diff --git a/Frameworks/PSMTabBar/Images/pi.png b/Frameworks/PSMTabBar/Images/pi.png Binary files differindex 4d598dc7..9cd57539 100644 --- a/Frameworks/PSMTabBar/Images/pi.png +++ b/Frameworks/PSMTabBar/Images/pi.png diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m index 2a92a2b1..6a062efe 100644 --- a/Frameworks/PSMTabBar/PSMTabBarControl.m +++ b/Frameworks/PSMTabBar/PSMTabBarControl.m @@ -244,8 +244,8 @@ - (void)viewWillMoveToWindow:(NSWindow *)aWindow { NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; - [center removeObserver:self name:NSWindowDidBecomeKeyNotification object:nil]; - [center removeObserver:self name:NSWindowDidResignKeyNotification object:nil]; + [center removeObserver:self name:NSWindowDidBecomeMainNotification object:nil]; + [center removeObserver:self name:NSWindowDidResignMainNotification object:nil]; [center removeObserver:self name:NSWindowDidUpdateNotification object:nil]; [center removeObserver:self name:NSWindowDidMoveNotification object:nil]; @@ -262,6 +262,9 @@ } } +/** + * Allow a window to be redrawn in response to changes in position or focus level. + */ - (void)windowStatusDidChange:(NSNotification *)notification { [self setNeedsDisplay:YES]; @@ -1747,7 +1750,8 @@ { // hide? must readjust things if I'm not supposed to be showing // this block of code only runs when the app launches - if ([self hideForSingleTab] && ([_cells count] <= 1) && !_awakenedFromNib) { + if (!_awakenedFromNib && [self hideForSingleTab] && ([_cells count] <= 1)) { + // must adjust frames now before display NSRect myFrame = [self frame]; if ([self orientation] == PSMTabBarHorizontalOrientation) { @@ -1801,12 +1805,12 @@ [[self delegate] tabView:[self tabView] tabBarDidHide:self]; } } - + + // The above tasks only needs to be run once, so set a flag to ensure that _awakenedFromNib = YES; + + // Allow the tab bar to redraw itself in result to window ordering/sheet/etc changes [self setNeedsDisplay:YES]; - - //we only need to do this once - [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidUpdateNotification object:nil]; } #pragma mark - diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index b0a96ccd..6feb49a4 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -414,7 +414,7 @@ float shadowAlpha = 0.4f; // When the window is in the background, tone down the colours - if (![[tabBar window] isMainWindow] || ![NSApp isActive]) { + if ((![[tabBar window] isMainWindow] && ![[[tabBar window] attachedSheet] isMainWindow]) || ![NSApp isActive]) { backgroundCalibratedWhite = 0.73f; if (systemVersion >= 0x1070) backgroundCalibratedWhite = 0.79f; lineCalibratedWhite = 0.49f; @@ -505,7 +505,7 @@ } // Set up colours - if ([[tabBar window] isMainWindow] && [NSApp isActive]) { + if (([[tabBar window] isMainWindow] || [[[tabBar window] attachedSheet] isMainWindow]) && [NSApp isActive]) { lineColor = [NSColor darkGrayColor]; if ([cell state] == NSOnState) { fillColor = [NSColor colorWithCalibratedWhite:(systemVersion >= 0x1070)?0.63f:0.59f alpha:1.0f]; @@ -609,7 +609,7 @@ CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGContextSaveGState(context); NSPoint topLeft, topRight; - CGFloat drawAlpha = ([[tabBar window] isMainWindow] && [NSApp isActive])? 1.0f : 0.7f; + CGFloat drawAlpha = (([[tabBar window] isMainWindow] || [[[tabBar window] attachedSheet] isMainWindow]) && [NSApp isActive])? 1.0f : 0.7f; outlineBezier = [NSBezierPath bezierPath]; // Calculate the endpoints of the line |