Updated UI
parent
62ad443ad5
commit
0cd43c174b
|
@ -1,8 +1,8 @@
|
|||
/* ClickField */
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "RoundBackgroundField.h"
|
||||
@interface ClickField : RoundBackgroundField
|
||||
|
||||
@interface ClickField : NSTextField
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
//
|
||||
// RoundBackgroundCell.h
|
||||
// Cog
|
||||
//
|
||||
// Created by Zaphod Beeblebrox on 4/28/06.
|
||||
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface RoundBackgroundCell : NSTextFieldCell {
|
||||
NSBezierPath *path;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// BLRoundedTableCell.m
|
||||
//
|
||||
// Created by Fraser Speirs on Wed Mar 17 2004.
|
||||
//
|
||||
// This code is placed in the public domain.
|
||||
// It is based on ideas presented by Apple Computer
|
||||
// in sample code via ADC, extended to suit the context of
|
||||
// NSTableViewCell
|
||||
|
||||
#import "RoundBackgroundCell.h"
|
||||
|
||||
|
||||
@implementation RoundBackgroundCell
|
||||
|
||||
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
|
||||
NSRect labelRect = [self drawingRectForBounds:cellFrame];
|
||||
float capRadius = NSHeight(labelRect) / 2.0;
|
||||
|
||||
// Next, we hack up a slightly different rect for the superclass
|
||||
// to draw in. This shifts the text to the right out of the
|
||||
// highlight curve and makes sure the text doesn't jump around
|
||||
// when the selection changes
|
||||
float widthIndent = 5.0;
|
||||
float heightIndent = 2.0;
|
||||
NSRect newRect = NSMakeRect(cellFrame.origin.x+widthIndent,
|
||||
cellFrame.origin.y+heightIndent,
|
||||
cellFrame.size.width-widthIndent,
|
||||
cellFrame.size.height-heightIndent);
|
||||
|
||||
if([self isHighlighted]) {
|
||||
[super drawInteriorWithFrame: newRect inView: controlView];
|
||||
}
|
||||
else {
|
||||
[super drawInteriorWithFrame: newRect inView: controlView];
|
||||
NSBezierPath *highlightPath = [[NSBezierPath alloc] init];
|
||||
|
||||
NSPoint startPoint = NSMakePoint(labelRect.origin.x+capRadius,
|
||||
labelRect.origin.y+capRadius);
|
||||
|
||||
NSPoint endPoint = NSMakePoint((labelRect.origin.x-capRadius)+(labelRect.size.width),
|
||||
labelRect.origin.y+capRadius);
|
||||
|
||||
[highlightPath appendBezierPathWithArcWithCenter: startPoint
|
||||
radius: capRadius
|
||||
startAngle: 90.0f
|
||||
endAngle: 270.f
|
||||
clockwise: NO];
|
||||
|
||||
[highlightPath appendBezierPathWithArcWithCenter: endPoint
|
||||
radius: capRadius
|
||||
startAngle: 270.0f
|
||||
endAngle: 90.f
|
||||
clockwise: NO];
|
||||
|
||||
[highlightPath closePath];
|
||||
|
||||
// Might want to change the text color here
|
||||
// NSColor *originalTextColor = [self textColor];
|
||||
if (highlightPath) {
|
||||
[[[NSColor controlAlternatingRowBackgroundColors] objectAtIndex:1] set];
|
||||
[highlightPath fill];
|
||||
|
||||
NSColor *strokeColor = [NSColor secondarySelectedControlColor];
|
||||
|
||||
[strokeColor set];
|
||||
[highlightPath stroke];
|
||||
[highlightPath release];
|
||||
}
|
||||
|
||||
[super drawInteriorWithFrame: newRect inView: controlView];
|
||||
|
||||
// And change it back here
|
||||
/*
|
||||
if (originalTextColor) {
|
||||
[self setTextColor:originalTextColor];
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
}
|
||||
@end
|
|
@ -1,16 +0,0 @@
|
|||
//
|
||||
// RoundBackgroundField.h
|
||||
// Cog
|
||||
//
|
||||
// Created by Zaphod Beeblebrox on 4/28/06.
|
||||
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface RoundBackgroundField : NSTextField {
|
||||
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,41 +0,0 @@
|
|||
//
|
||||
// RoundBackgroundField.m
|
||||
// Cog
|
||||
//
|
||||
// Created by Zaphod Beeblebrox on 4/28/06.
|
||||
// Copyright 2006 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RoundBackgroundField.h"
|
||||
#import "RoundBackgroundCell.h"
|
||||
|
||||
@implementation RoundBackgroundField
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)decoder
|
||||
{
|
||||
self = [super initWithCoder:decoder];
|
||||
if (self)
|
||||
{
|
||||
id cell = [[RoundBackgroundCell alloc] init];
|
||||
id oldcell = [self cell];
|
||||
|
||||
[cell setBackgroundColor: [self backgroundColor]];
|
||||
[cell setDrawsBackground: NO];
|
||||
|
||||
[cell setScrollable:[oldcell isScrollable]];
|
||||
[cell setAlignment:[oldcell alignment]];
|
||||
[cell setLineBreakMode:[oldcell lineBreakMode]];
|
||||
|
||||
[cell setAction: [oldcell action]];
|
||||
[cell setTarget: [oldcell target]];
|
||||
|
||||
[cell setStringValue: [oldcell stringValue]];
|
||||
|
||||
[self setCell: cell];
|
||||
[cell release];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
|
@ -13,6 +13,7 @@
|
|||
TrackingCell *trackingCell;
|
||||
trackingCell = [[TrackingCell alloc] init];
|
||||
|
||||
[trackingCell setControlSize:[[self cell] controlSize]];
|
||||
[trackingCell setAction:[[self cell] action]];
|
||||
[trackingCell setContinuous:[[self cell] isContinuous]];
|
||||
[trackingCell setTarget:[[self cell] target]];
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
"PrevButtonTooltip" = "Previous";
|
||||
"NextButtonTooltip" = "Next";
|
||||
|
||||
"TimeElapsed" = "Time: %i:%02i";
|
||||
"TimeRemaining" = "Time: -%i:%02i";
|
||||
"TimeElapsed" = "%i:%02i";
|
||||
"TimeRemaining" = "-%i:%02i";
|
||||
|
||||
"AddButtonTooltip" = "Add files";
|
||||
"RemoveButtonTooltip" = "Remove selected files";
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
{CLASS = ClickField; LANGUAGE = ObjC; SUPERCLASS = RoundBackgroundField; },
|
||||
{CLASS = ClickField; LANGUAGE = ObjC; SUPERCLASS = NSTextField; },
|
||||
{
|
||||
CLASS = DNDArrayController;
|
||||
LANGUAGE = ObjC;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>34 369 617 240 0 0 1024 746 </string>
|
||||
<string>141 329 617 240 0 0 1024 746 </string>
|
||||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
|
@ -28,11 +28,11 @@
|
|||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>823</integer>
|
||||
<integer>513</integer>
|
||||
<integer>21</integer>
|
||||
<integer>463</integer>
|
||||
<integer>823</integer>
|
||||
<integer>29</integer>
|
||||
<integer>21</integer>
|
||||
<integer>513</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8I127</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -599,7 +599,7 @@
|
|||
|
||||
NSEnumerator *enumerator;
|
||||
PlaylistEntry *entry;
|
||||
enumerator = [[self arrangedObjects] objectEnumerator];
|
||||
enumerator = [[self content] objectEnumerator];
|
||||
while (entry = [enumerator nextObject])
|
||||
{
|
||||
[filenames addObject:[entry filename]];
|
||||
|
|
Loading…
Reference in New Issue