aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-12-13 00:14:06 +0000
committerrowanbeentje <rowan@beent.je>2012-12-13 00:14:06 +0000
commit3b5642c68f57865888b60a1f846fed3810333dae (patch)
tree8d76fa2dda27594b369421cb5099b5b8dd8726c6 /Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
parent9c0184ce97a1e158d926afb8e4be034c61999563 (diff)
downloadsequelpro-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/PSMTabBar/Styles/PSMSequelProTabStyle.m')
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m6
1 files changed, 3 insertions, 3 deletions
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