CTGradientAdditions is now ProgressGradients
This commit is contained in:
parent
ea35984de4
commit
7b1f6d5e40
|
@ -305,7 +305,7 @@
|
|||
D4AF3B2F0C41F7A500D46B6B /* list.c in Sources */ = {isa = PBXBuildFile; fileRef = D4AF3B2D0C41F7A500D46B6B /* list.c */; };
|
||||
D4AF3B300C41F7A600D46B6B /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = D4AF3B2E0C41F7A500D46B6B /* list.h */; };
|
||||
E138A9770C04D88F00C5426C /* CTGradient.m in Sources */ = {isa = PBXBuildFile; fileRef = E138A9740C04D88F00C5426C /* CTGradient.m */; };
|
||||
E138A9780C04D88F00C5426C /* CTGradientAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E138A9760C04D88F00C5426C /* CTGradientAdditions.m */; };
|
||||
E138A9780C04D88F00C5426C /* ProgressGradients.m in Sources */ = {isa = PBXBuildFile; fileRef = E138A9760C04D88F00C5426C /* ProgressGradients.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -775,8 +775,8 @@
|
|||
D4AF3B2E0C41F7A500D46B6B /* list.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = list.h; path = libtransmission/list.h; sourceTree = "<group>"; };
|
||||
E138A9730C04D88F00C5426C /* CTGradient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTGradient.h; sourceTree = "<group>"; };
|
||||
E138A9740C04D88F00C5426C /* CTGradient.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CTGradient.m; sourceTree = "<group>"; };
|
||||
E138A9750C04D88F00C5426C /* CTGradientAdditions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CTGradientAdditions.h; sourceTree = "<group>"; };
|
||||
E138A9760C04D88F00C5426C /* CTGradientAdditions.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = CTGradientAdditions.m; sourceTree = "<group>"; };
|
||||
E138A9750C04D88F00C5426C /* ProgressGradients.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ProgressGradients.h; path = ../ProgressGradients.h; sourceTree = "<group>"; };
|
||||
E138A9760C04D88F00C5426C /* ProgressGradients.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ProgressGradients.m; path = ../ProgressGradients.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -1314,8 +1314,8 @@
|
|||
children = (
|
||||
E138A9730C04D88F00C5426C /* CTGradient.h */,
|
||||
E138A9740C04D88F00C5426C /* CTGradient.m */,
|
||||
E138A9750C04D88F00C5426C /* CTGradientAdditions.h */,
|
||||
E138A9760C04D88F00C5426C /* CTGradientAdditions.m */,
|
||||
E138A9750C04D88F00C5426C /* ProgressGradients.h */,
|
||||
E138A9760C04D88F00C5426C /* ProgressGradients.m */,
|
||||
);
|
||||
name = CTGradient;
|
||||
path = macosx/CTGradient;
|
||||
|
@ -1890,7 +1890,7 @@
|
|||
A2385DD40BFE06C800B24EF6 /* DragOverlayWindow.m in Sources */,
|
||||
A2FB057F0BFEB6800095564D /* DragOverlayView.m in Sources */,
|
||||
E138A9770C04D88F00C5426C /* CTGradient.m in Sources */,
|
||||
E138A9780C04D88F00C5426C /* CTGradientAdditions.m in Sources */,
|
||||
E138A9780C04D88F00C5426C /* ProgressGradients.m in Sources */,
|
||||
A215760B0C0D449A0057A26A /* NSBezierPathAdditions.m in Sources */,
|
||||
A2DF37070C220D03006523C1 /* CreatorWindowController.m in Sources */,
|
||||
35F373030C2DA89000DAA8F2 /* FilePriorityCell.m in Sources */,
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#import "BadgeView.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "NSBezierPathAdditions.h"
|
||||
|
||||
#define COMPLETED_BOTTOM_PADDING 5.0
|
||||
#define SPEED_BOTTOM_PADDING 2.0
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
|
||||
@interface FilterButton : NSButton
|
||||
{
|
||||
int fCount;
|
||||
NSInteger fCount;
|
||||
}
|
||||
|
||||
- (void) setCount: (int) count;
|
||||
- (void) setCount: (NSInteger) count;
|
||||
|
||||
@end
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void) setCount: (int) count
|
||||
- (void) setCount: (NSInteger) count
|
||||
{
|
||||
if (count == fCount)
|
||||
return;
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "CTGradient.h"
|
||||
@class CTGradient;
|
||||
|
||||
@interface CTGradient (ProgressBar)
|
||||
@interface ProgressGradients : NSObject
|
||||
|
||||
+ (CTGradient *) progressGradientForRed: (CGFloat) redComponent green: (CGFloat) greenComponent blue: (CGFloat) blueComponent;
|
||||
|
|
@ -22,9 +22,10 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#import "CTGradientAdditions.h"
|
||||
#import "ProgressGradients.h"
|
||||
#import "CTGradient.h"
|
||||
|
||||
@implementation CTGradient (ProgressBar)
|
||||
@implementation ProgressGradients
|
||||
|
||||
+ (CTGradient *) progressGradientForRed: (CGFloat) redComponent green: (CGFloat) greenComponent blue: (CGFloat) blueComponent
|
||||
{
|
|
@ -22,8 +22,6 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
@class CTGradient;
|
||||
|
||||
@interface TorrentCell : NSActionCell
|
||||
{
|
||||
NSUserDefaults * fDefaults;
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "NSBezierPathAdditions.h"
|
||||
#import "CTGradientAdditions.h"
|
||||
#import "ProgressGradients.h"
|
||||
#import "CTGradient.h"
|
||||
|
||||
#define BAR_HEIGHT 12.0f
|
||||
|
||||
|
@ -588,7 +589,7 @@
|
|||
noIncludeRect.origin.x += barRect.size.width - rightNoIncludeWidth;
|
||||
noIncludeRect.size.width = rightNoIncludeWidth;
|
||||
|
||||
[[CTGradient progressLightGrayGradient] fillRect: noIncludeRect angle: 90];
|
||||
[[ProgressGradients progressLightGrayGradient] fillRect: noIncludeRect angle: 90];
|
||||
}
|
||||
|
||||
if (rightWidth > 0)
|
||||
|
@ -605,7 +606,7 @@
|
|||
notAvailableRect.origin.x += leftWidth + rightWidth;
|
||||
notAvailableRect.size.width = notAvailableWidth;
|
||||
|
||||
[[CTGradient progressRedGradient] fillRect: notAvailableRect angle: 90];
|
||||
[[ProgressGradients progressRedGradient] fillRect: notAvailableRect angle: 90];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -615,7 +616,7 @@
|
|||
includeRect.origin.x += leftWidth;
|
||||
includeRect.size.width = rightWidth;
|
||||
|
||||
[[CTGradient progressWhiteGradient] fillRect: includeRect angle: 90];
|
||||
[[ProgressGradients progressWhiteGradient] fillRect: includeRect angle: 90];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -628,7 +629,7 @@
|
|||
if ([torrent isActive])
|
||||
{
|
||||
if ([torrent isChecking])
|
||||
[[CTGradient progressYellowGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressYellowGradient] fillRect: completeRect angle: 90];
|
||||
else if ([torrent isSeeding])
|
||||
{
|
||||
NSInteger ratioLeftWidth = leftWidth * (1.0f - [torrent progressStopRatio]);
|
||||
|
@ -640,30 +641,30 @@
|
|||
ratioLeftRect.origin.x += leftWidth;
|
||||
ratioLeftRect.size.width = ratioLeftWidth;
|
||||
|
||||
[[CTGradient progressLightGreenGradient] fillRect: ratioLeftRect angle: 90];
|
||||
[[ProgressGradients progressLightGreenGradient] fillRect: ratioLeftRect angle: 90];
|
||||
}
|
||||
|
||||
if (leftWidth > 0)
|
||||
{
|
||||
completeRect.size.width = leftWidth;
|
||||
|
||||
[[CTGradient progressGreenGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressGreenGradient] fillRect: completeRect angle: 90];
|
||||
}
|
||||
}
|
||||
else
|
||||
[[CTGradient progressBlueGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressBlueGradient] fillRect: completeRect angle: 90];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([torrent waitingToStart])
|
||||
{
|
||||
if ([torrent progressLeft] <= 0.0f)
|
||||
[[CTGradient progressDarkGreenGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressDarkGreenGradient] fillRect: completeRect angle: 90];
|
||||
else
|
||||
[[CTGradient progressDarkBlueGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressDarkBlueGradient] fillRect: completeRect angle: 90];
|
||||
}
|
||||
else
|
||||
[[CTGradient progressGrayGradient] fillRect: completeRect angle: 90];
|
||||
[[ProgressGradients progressGrayGradient] fillRect: completeRect angle: 90];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue