Improve the looks a bit on Yosemite. The app must now be compiled with the 10.10 SDK.
This commit is contained in:
parent
82cc420214
commit
953780f38e
|
@ -3321,7 +3321,7 @@
|
|||
LIBRARY_SEARCH_PATHS = "third-party/curl/lib";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx10.8;
|
||||
SDKROOT = macosx10.10;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -3438,7 +3438,7 @@
|
|||
LIBRARY_SEARCH_PATHS = "third-party/curl/lib";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
OTHER_CFLAGS = "-DNDEBUG";
|
||||
SDKROOT = macosx10.8;
|
||||
SDKROOT = macosx10.10;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -3496,7 +3496,7 @@
|
|||
INFOPLIST_PREPROCESS = YES;
|
||||
LIBRARY_SEARCH_PATHS = "third-party/curl/lib";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = macosx10.8;
|
||||
SDKROOT = macosx10.10;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
};
|
||||
name = "Release - Debug";
|
||||
|
@ -3595,9 +3595,7 @@
|
|||
A2E384CF130DFB1D001F501B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
POSIX,
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = POSIX;
|
||||
PRODUCT_NAME = utp;
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -3605,9 +3603,7 @@
|
|||
A2E384D0130DFB1D001F501B /* Release - Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
POSIX,
|
||||
);
|
||||
GCC_PREPROCESSOR_DEFINITIONS = POSIX;
|
||||
PRODUCT_NAME = utp;
|
||||
};
|
||||
name = "Release - Debug";
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#import "FilterBarView.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
|
||||
@implementation FilterBarView
|
||||
|
||||
|
@ -30,10 +31,12 @@
|
|||
{
|
||||
if ((self = [super initWithFrame: rect]))
|
||||
{
|
||||
if (![NSApp isOnYosemiteOrBetter]) {
|
||||
NSColor * lightColor = [NSColor colorWithCalibratedRed: 235.0/255.0 green: 235.0/255.0 blue: 235.0/255.0 alpha: 1.0];
|
||||
NSColor * darkColor = [NSColor colorWithCalibratedRed: 205.0/255.0 green: 205.0/255.0 blue: 205.0/255.0 alpha: 1.0];
|
||||
fGradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -55,6 +58,18 @@
|
|||
|
||||
- (void) drawRect: (NSRect) rect
|
||||
{
|
||||
if ([NSApp isOnYosemiteOrBetter]) {
|
||||
[[NSColor windowBackgroundColor] setFill];
|
||||
NSRectFill(rect);
|
||||
|
||||
const NSRect lineBorderRect = NSMakeRect(NSMinX(rect), 0.0, NSWidth(rect), 1.0);
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
[[NSColor lightGrayColor] setFill];
|
||||
NSRectFill(lineBorderRect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
NSInteger count = 0;
|
||||
NSRect gridRects[2];
|
||||
NSColor * colorRects[2];
|
||||
|
@ -87,6 +102,7 @@
|
|||
}
|
||||
|
||||
NSRectFillListWithColors(gridRects, colorRects, count);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -32,5 +32,6 @@
|
|||
|
||||
- (BOOL) isOnLionOrBetter;
|
||||
- (BOOL) isOnMountainLionOrBetter;
|
||||
- (BOOL) isOnYosemiteOrBetter;
|
||||
|
||||
@end
|
||||
|
|
|
@ -36,4 +36,9 @@
|
|||
return floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_7;
|
||||
}
|
||||
|
||||
- (BOOL) isOnYosemiteOrBetter
|
||||
{
|
||||
return floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_9;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
NSColor * darkColor = [NSColor colorWithCalibratedRed: 155.0/255.0 green: 155.0/255.0 blue: 155.0/255.0 alpha: 1.0];
|
||||
fGradient = [[NSGradient alloc] initWithStartingColor: lightColor endingColor: darkColor];
|
||||
|
||||
if([NSApp isOnLionOrBetter])
|
||||
if([NSApp isOnLionOrBetter] && ![NSApp isOnYosemiteOrBetter])
|
||||
{
|
||||
CIFilter * randomFilter = [CIFilter filterWithName: @"CIRandomGenerator"];
|
||||
[randomFilter setDefaults];
|
||||
|
@ -85,6 +85,18 @@
|
|||
|
||||
- (void) drawRect: (NSRect) rect
|
||||
{
|
||||
if ([NSApp isOnYosemiteOrBetter]) {
|
||||
[[NSColor windowBackgroundColor] setFill];
|
||||
NSRectFill(rect);
|
||||
|
||||
const NSRect lineBorderRect = NSMakeRect(NSMinX(rect), 0.0, NSWidth(rect), 1.0);
|
||||
if (NSIntersectsRect(lineBorderRect, rect))
|
||||
{
|
||||
[[NSColor lightGrayColor] setFill];
|
||||
NSRectFill(lineBorderRect);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const BOOL active = [[self window] isMainWindow];
|
||||
|
||||
NSInteger count = 0;
|
||||
|
@ -145,6 +157,7 @@
|
|||
operation: NSCompositeSourceOver
|
||||
fraction: 0.12];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue