Changeset 3189
- Timestamp:
- Sep 26, 2007, 5:42:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentCell.m
r3187 r3189 284 284 285 285 int leftWidth = barRect.size.width; 286 float progress = [torrent progress] , left = [torrent progressLeft];286 float progress = [torrent progress]; 287 287 288 288 if (progress < 1.0) … … 291 291 leftWidth -= rightWidth; 292 292 293 float rightProgress = 1.0 - progress ;294 if ( left < rightProgress)295 { 296 int rightNoIncludeWidth = rightWidth * ((rightProgress - left) / rightProgress);293 float rightProgress = 1.0 - progress, progressLeft = [torrent progressLeft]; 294 if (progressLeft < rightProgress) 295 { 296 int rightNoIncludeWidth = rightWidth * ((rightProgress - progressLeft) / rightProgress); 297 297 rightWidth -= rightNoIncludeWidth; 298 298 … … 334 334 { 335 335 #warning integer-ize! 336 NSRect ratioRect = completeRect;337 ratioRect.size.width *= [torrent progressStopRatio]; 336 /*NSRect ratioRect = completeRect; 337 ratioRect.size.width *= [torrent progressStopRatio];*/ 338 338 339 if (ratioRect.size.width < completeRect.size.width) 339 int ratioLeftWidth = leftWidth * (1.0 - [torrent progressStopRatio]); 340 leftWidth -= ratioLeftWidth; 341 342 if (ratioLeftWidth > 0) 340 343 { 344 NSRect ratioLeftRect = barRect; 345 ratioLeftRect.origin.x += leftWidth; 346 ratioLeftRect.size.width = ratioLeftWidth; 347 341 348 if (!fLightGreenGradient) 342 349 fLightGreenGradient = [[CTGradient progressLightGreenGradient] retain]; 343 [fLightGreenGradient fillRect: completeRect angle: -90];350 [fLightGreenGradient fillRect: ratioLeftRect angle: -90]; 344 351 } 345 352 346 if (!fGreenGradient) 347 fGreenGradient = [[CTGradient progressGreenGradient] retain]; 348 [fGreenGradient fillRect: ratioRect angle: -90]; 353 if (leftWidth > 0) 354 { 355 completeRect.size.width = leftWidth; 356 357 if (!fGreenGradient) 358 fGreenGradient = [[CTGradient progressGreenGradient] retain]; 359 [fGreenGradient fillRect: completeRect angle: -90]; 360 } 349 361 } 350 362 else … … 359 371 if ([torrent waitingToStart]) 360 372 { 361 if ( left<= 0.0)373 if ([torrent progressLeft] <= 0.0) 362 374 { 363 375 if (!fDarkGreenGradient)
Note: See TracChangeset
for help on using the changeset viewer.