mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
Swap green and blue in the advanced bar/pieces view
This commit is contained in:
+2
-2
@@ -29,8 +29,8 @@
|
||||
{
|
||||
int8_t * fPieces;
|
||||
|
||||
NSImage * fBack, * fWhitePiece, * fGreenPiece, * fRedPiece,
|
||||
* fBlue1Piece, * fBlue2Piece, * fBlue3Piece;
|
||||
NSImage * fBack, * fWhitePiece, * fBluePiece, * fRedPiece,
|
||||
* fGreen1Piece, * fGreen2Piece, * fGreen3Piece;
|
||||
|
||||
Torrent * fTorrent;
|
||||
int fNumPieces, fAcross, fWidth, fExtraBorder;
|
||||
|
||||
+29
-29
@@ -62,15 +62,15 @@
|
||||
[bp fill];
|
||||
[fWhitePiece unlockFocus];
|
||||
|
||||
//green box image
|
||||
fGreenPiece = [[NSImage alloc] initWithSize: size];
|
||||
//blue box image
|
||||
fBluePiece = [[NSImage alloc] initWithSize: size];
|
||||
|
||||
[fGreenPiece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.557 green: 0.992 blue: 0.639 alpha: 1.0] set];
|
||||
[fBluePiece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set];
|
||||
[bp fill];
|
||||
[fGreenPiece unlockFocus];
|
||||
[fBluePiece unlockFocus];
|
||||
|
||||
//green box image
|
||||
//red box image
|
||||
fRedPiece = [[NSImage alloc] initWithSize: size];
|
||||
|
||||
[fRedPiece lockFocus];
|
||||
@@ -78,29 +78,29 @@
|
||||
[bp fill];
|
||||
[fRedPiece unlockFocus];
|
||||
|
||||
//blue 1 box image
|
||||
fBlue1Piece = [[NSImage alloc] initWithSize: size];
|
||||
//green 1 box image
|
||||
fGreen1Piece = [[NSImage alloc] initWithSize: size];
|
||||
|
||||
[fBlue1Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.682 green: 0.839 blue: 1.0 alpha: 1.0] set];
|
||||
[fGreen1Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.6 green: 1.0 blue: 0.8 alpha: 1.0] set];
|
||||
[bp fill];
|
||||
[fBlue1Piece unlockFocus];
|
||||
[fGreen1Piece unlockFocus];
|
||||
|
||||
//blue 2 box image
|
||||
fBlue2Piece = [[NSImage alloc] initWithSize: size];
|
||||
//green 2 box image
|
||||
fGreen2Piece = [[NSImage alloc] initWithSize: size];
|
||||
|
||||
[fBlue2Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.506 green: 0.745 blue: 1.0 alpha: 1.0] set];
|
||||
[fGreen2Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.4 green: 1.0 blue: 0.6 alpha: 1.0] set];
|
||||
[bp fill];
|
||||
[fBlue2Piece unlockFocus];
|
||||
[fGreen2Piece unlockFocus];
|
||||
|
||||
//blue 3 box image
|
||||
fBlue3Piece = [[NSImage alloc] initWithSize: size];
|
||||
//green 3 box image
|
||||
fGreen3Piece = [[NSImage alloc] initWithSize: size];
|
||||
|
||||
[fBlue3Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.35 green: 0.65 blue: 1.0 alpha: 1.0] set];
|
||||
[fGreen3Piece lockFocus];
|
||||
[[NSColor colorWithCalibratedRed: 0.0 green: 1.0 blue: 0.4 alpha: 1.0] set];
|
||||
[bp fill];
|
||||
[fBlue3Piece unlockFocus];
|
||||
[fGreen3Piece unlockFocus];
|
||||
|
||||
//actually draw the box
|
||||
[self setTorrent: nil];
|
||||
@@ -113,10 +113,10 @@
|
||||
[fBack release];
|
||||
[fWhitePiece release];
|
||||
[fRedPiece release];
|
||||
[fGreenPiece release];
|
||||
[fBlue1Piece release];
|
||||
[fBlue2Piece release];
|
||||
[fBlue3Piece release];
|
||||
[fBluePiece release];
|
||||
[fGreen1Piece release];
|
||||
[fGreen2Piece release];
|
||||
[fGreen3Piece release];
|
||||
|
||||
if (fTorrent)
|
||||
[fTorrent release];
|
||||
@@ -196,7 +196,7 @@
|
||||
if (first || fPieces[index] == -2)
|
||||
{
|
||||
fPieces[index] = -1;
|
||||
pieceImage = fGreenPiece;
|
||||
pieceImage = fBluePiece;
|
||||
}
|
||||
else if (fPieces[index] != -1)
|
||||
{
|
||||
@@ -218,7 +218,7 @@
|
||||
if (first || fPieces[index] != 1)
|
||||
{
|
||||
fPieces[index] = 1;
|
||||
pieceImage = fBlue1Piece;
|
||||
pieceImage = fGreen1Piece;
|
||||
}
|
||||
}
|
||||
else if (piece == 2)
|
||||
@@ -226,7 +226,7 @@
|
||||
if (first || fPieces[index] != 2)
|
||||
{
|
||||
fPieces[index] = 2;
|
||||
pieceImage = fBlue2Piece;
|
||||
pieceImage = fGreen2Piece;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -234,7 +234,7 @@
|
||||
if (first || fPieces[index] != 3)
|
||||
{
|
||||
fPieces[index] = 3;
|
||||
pieceImage = fBlue3Piece;
|
||||
pieceImage = fGreen3Piece;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-14
@@ -50,12 +50,12 @@
|
||||
#define BE OSSwapBigToHostConstInt32
|
||||
|
||||
static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
kBlue1 = BE(0xA0DCFFFF), //160, 220, 255
|
||||
kBlue2 = BE(0x78BEFFFF), //120, 190, 255
|
||||
kBlue3 = BE(0x50A0FFFF), //80, 160, 255
|
||||
kBlue4 = BE(0x1E46B4FF), //30, 70, 180
|
||||
kBlue = BE(0x50A0FFFF), //80, 160, 255
|
||||
kBlue2 = BE(0x1E46B4FF), //30, 70, 180
|
||||
kGray = BE(0x969696FF), //150, 150, 150
|
||||
kGreen = BE(0x00FF00FF), //0, 255, 0
|
||||
kGreen1 = BE(0x99FFCCFF), //153, 255, 204
|
||||
kGreen2 = BE(0x66FF99FF), //102, 255, 153
|
||||
kGreen3 = BE(0x00FF66FF), //0, 255, 102
|
||||
kWhite = BE(0xFFFFFFFF); //255, 255, 255
|
||||
|
||||
- (id) initWithPath: (NSString *) path lib: (tr_handle_t *) lib
|
||||
@@ -853,7 +853,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
int8_t * pieces = malloc(MAX_PIECES);
|
||||
[self getAvailability: pieces size: MAX_PIECES];
|
||||
|
||||
//lines 2 to 14: blue or grey depending on whether we have the piece or not
|
||||
//lines 2 to 14: blue, green, or gray depending on whether we have the piece or not
|
||||
int have = 0, avail = 0;
|
||||
uint32_t color;
|
||||
BOOL change;
|
||||
@@ -864,7 +864,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
{
|
||||
if (fPieces[w] != -1)
|
||||
{
|
||||
color = kGreen;
|
||||
color = kBlue;
|
||||
fPieces[w] = -1;
|
||||
change = YES;
|
||||
}
|
||||
@@ -885,7 +885,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
{
|
||||
if (fPieces[w] != 1)
|
||||
{
|
||||
color = kBlue1;
|
||||
color = kGreen1;
|
||||
fPieces[w] = 1;
|
||||
change = YES;
|
||||
}
|
||||
@@ -894,7 +894,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
{
|
||||
if (fPieces[w] != 2)
|
||||
{
|
||||
color = kBlue2;
|
||||
color = kGreen2;
|
||||
fPieces[w] = 2;
|
||||
change = YES;
|
||||
}
|
||||
@@ -903,7 +903,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
{
|
||||
if (fPieces[w] != 3)
|
||||
{
|
||||
color = kBlue3;
|
||||
color = kGreen3;
|
||||
fPieces[w] = 3;
|
||||
change = YES;
|
||||
}
|
||||
@@ -927,13 +927,13 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
|
||||
p = (uint32_t *) bitmapData;
|
||||
for (w = 0; w < have; w++)
|
||||
{
|
||||
p[w] = kBlue4;
|
||||
p[w + bytesPerRow / 4] = kBlue4;
|
||||
p[w] = kBlue2;
|
||||
p[w + bytesPerRow / 4] = kBlue2;
|
||||
}
|
||||
for (; w < avail + have; w++)
|
||||
{
|
||||
p[w] = kGreen;
|
||||
p[w + bytesPerRow / 4] = kGreen;
|
||||
p[w] = kGreen3;
|
||||
p[w + bytesPerRow / 4] = kGreen3;
|
||||
}
|
||||
for (; w < MAX_PIECES; w++)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -41,9 +41,9 @@
|
||||
<div id="pagetitle">
|
||||
<h1>What do the colors mean in the advanced progress bar/pieces box? </h1>
|
||||
</div>
|
||||
<p><font color="green">Green</font>: we have this piece <br>
|
||||
<p><font color="green">Blue</font>: we have this piece <br>
|
||||
<font color="gray">Gray/White</font>: no connected peers have this piece <br>
|
||||
<font color="blue">Blue</font>: connected peers have this piece (the darker the blue, the more there are) <br>
|
||||
<font color="blue">Green</font>: connected peers have this piece (the darker the green, the more there are) <br>
|
||||
|
||||
<p>The fine, dark blue line on top of the bar shows the global progression, while the green line following it shows how much of the remaining download is actually available.<br>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user