aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-06-06 22:15:14 +0200
committerMax <post@wickenrode.com>2015-06-06 22:24:38 +0200
commit68bf083ef4146e37f8726b035e646b9ab7e96333 (patch)
tree3e5a723d2bfa4ee5ce836ba1780b54bb9cdf86f8
parentcbc0c4599aa35f7589b1b0d0d1365f1bffa4124e (diff)
downloadsequelpro-68bf083ef4146e37f8726b035e646b9ab7e96333.tar.gz
sequelpro-68bf083ef4146e37f8726b035e646b9ab7e96333.tar.bz2
sequelpro-68bf083ef4146e37f8726b035e646b9ab7e96333.zip
Adapt background color of custom tooltips for 10.10
(note: the shadow is still off)
-rw-r--r--Source/SPTooltip.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m
index 478945ed..eefa7520 100644
--- a/Source/SPTooltip.m
+++ b/Source/SPTooltip.m
@@ -57,6 +57,7 @@
// See more possible syntaxa in SPTooltip to init a tooltip
#import "SPTooltip.h"
+#import "SPOSInfo.h"
#include <tgmath.h>
@@ -199,7 +200,6 @@ static CGFloat slow_in_out (CGFloat t)
[self setReleasedWhenClosed:YES];
[self setAlphaValue:0.97f];
[self setOpaque:NO];
- [self setBackgroundColor:[NSColor colorWithDeviceRed:1.0f green:0.96f blue:0.76f alpha:1.0f]];
[self setBackgroundColor:[NSColor clearColor]];
[self setHasShadow:YES];
[self setLevel:NSStatusWindowLevel];
@@ -298,7 +298,8 @@ static CGFloat slow_in_out (CGFloat t)
@"<body>%@</body>"
@"</html>";
- NSString *bgColor = ([displayOptions objectForKey:@"backgroundcolor"]) ? [displayOptions objectForKey:@"backgroundcolor"] : @"#F9FBC5";
+ NSString *tooltipColor = ([SPOSInfo isOSVersionAtLeastMajor:10 minor:10 patch:0])? @"#F0F0F0" : @"#F9FBC5";
+ NSString *bgColor = ([displayOptions objectForKey:@"backgroundcolor"]) ? [displayOptions objectForKey:@"backgroundcolor"] : tooltipColor;
BOOL isTransparent = ([displayOptions objectForKey:@"transparent"]) ? YES : NO;