1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-11 14:43:42 +00:00

move a variable outside of a loop

This commit is contained in:
Mitchell Livingston 2012-10-14 17:33:23 +00:00
parent 3fbc1efd2b
commit 2430bb060d
3 changed files with 2 additions and 3 deletions

View file

@ -89,8 +89,8 @@
NSArray * fields = @[ fDateAddedField, fDateCompletedField, fDateActivityField, fStateField, fProgressField, fHaveField, fDownloadedTotalField, fUploadedTotalField, fFailedHashField, fRatioField, fDownloadTimeField, fSeedTimeField, fErrorScrollView ];
const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
for (NSView * field in fields) {
const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
NSRect frame = [field frame];
frame.origin.x += widthIncrease;
frame.size.width -= widthIncrease;

View file

@ -84,8 +84,8 @@
NSArray * fields = @[ fPiecesField, fHashField, fSecureField, fCreatorField, fDateCreatedField, fCommentScrollView, fDataLocationField ];
const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
for (NSView * field in fields) {
const CGFloat widthIncrease = newMaxWidth - oldMaxWidth;
NSRect frame = [field frame];
frame.origin.x += widthIncrease;
frame.size.width -= widthIncrease;

View file

@ -42,7 +42,6 @@
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];
//noise only for 10.7 +
if([NSApp isOnLionOrBetter])
{
CIFilter * randomFilter = [CIFilter filterWithName: @"CIRandomGenerator"];