Skip to content

Commit

Permalink
[jigish#241] order of operations =P
Browse files Browse the repository at this point in the history
  • Loading branch information
Jigish Patel committed Feb 23, 2013
1 parent 6350d2b commit 5557748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Slate/CornerOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ - (void)afterEvalOptions {
if ([direction isEqualToString:TOP_LEFT]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX" y:@"screenOriginY"]];
} else if ([direction isEqualToString:TOP_RIGHT]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[@"screenOriginX+screenSizeX-" stringByAppendingString:[[self dimensions] x]] y:@"screenOriginY"]];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[NSString stringWithFormat:@"screenOriginX+screenSizeX-(%@)", [[self dimensions] x]] y:@"screenOriginY"]];
} else if ([direction isEqualToString:BOTTOM_LEFT]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX" y:[@"screenOriginY+screenSizeY-" stringByAppendingString:[[self dimensions] y]]]];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX" y:[NSString stringWithFormat:@"screenOriginY+screenSizeY-(%@)", [[self dimensions] y]]]];
} else if ([direction isEqualToString:BOTTOM_RIGHT]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[@"screenOriginX+screenSizeX-" stringByAppendingString:[[self dimensions] x]] y:[@"screenOriginY+screenSizeY-" stringByAppendingString:[[self dimensions] y]]]];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[NSString stringWithFormat:@"screenOriginX+screenSizeX-(%@)", [[self dimensions] x]] y:[NSString stringWithFormat:@"screenOriginY+screenSizeY-(%@)", [[self dimensions] y]]]];
} else {
SlateLogger(@"ERROR: Unrecognized corner '%@'", direction);
@throw([NSException exceptionWithName:@"Unrecognized Corner" reason:[NSString stringWithFormat:@"Unrecognized corner '%@'", direction] userInfo:nil]);
Expand Down
4 changes: 2 additions & 2 deletions Slate/PushOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ - (void)afterEvalOptions {
[self setDimensions:[[ExpressionPoint alloc] initWithX:@"screenSizeX" y:@"windowSizeY"]];
} else if ([style hasPrefix:BAR_RESIZE_WITH_VALUE]) {
NSString *resizeExpression = [[style componentsSeparatedByString:COLON] objectAtIndex:1];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX" y:[@"screenOriginY+screenSizeY-" stringByAppendingString:resizeExpression]]];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX" y:[NSString stringWithFormat:@"screenOriginY+screenSizeY-(%@)", resizeExpression]]];
[self setDimensions:[[ExpressionPoint alloc] initWithX:@"screenSizeX" y:resizeExpression]];
} else if ([style isEqualToString:NONE]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"windowTopLeftX" y:@"screenOriginY+screenSizeY-windowSizeY"]];
Expand Down Expand Up @@ -93,7 +93,7 @@ - (void)afterEvalOptions {
[self setDimensions:[[ExpressionPoint alloc] initWithX:@"windowSizeX" y:@"screenSizeY"]];
} else if ([style hasPrefix:BAR_RESIZE_WITH_VALUE]) {
NSString *resizeExpression = [[style componentsSeparatedByString:COLON] objectAtIndex:1];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[@"screenOriginX+screenSizeX-" stringByAppendingString:resizeExpression] y:@"screenOriginY"]];
[self setTopLeft:[[ExpressionPoint alloc] initWithX:[NSString stringWithFormat:@"screenOriginX+screenSizeX-(%@)", resizeExpression] y:@"screenOriginY"]];
[self setDimensions:[[ExpressionPoint alloc] initWithX:resizeExpression y:@"screenSizeY"]];
} else if ([style isEqualToString:NONE]) {
[self setTopLeft:[[ExpressionPoint alloc] initWithX:@"screenOriginX+screenSizeX-windowSizeX" y:@"windowTopLeftY"]];
Expand Down

0 comments on commit 5557748

Please sign in to comment.