Cleaned Code by Removing Location Tracking for Errors
This commit is contained in:
@@ -40,15 +40,16 @@
|
||||
|
||||
- (NSPoint)offsetOfChildLayoutAtIndex:(NSUInteger)index
|
||||
{
|
||||
NSRect bounds = self.bounds;
|
||||
if (index == 0) {
|
||||
NSRect nominatorBounds = [self childLayoutAtIndex:0].bounds;
|
||||
CGFloat y = MPFractionMiddle + kFractionFunctionLineWidth / 2 - nominatorBounds.origin.y;
|
||||
return NSMakePoint(kFractionFunctionHorizontalInset, y);
|
||||
return NSMakePoint((bounds.size.width - nominatorBounds.size.width) / 2, y);
|
||||
} else {
|
||||
NSRect denominatorBounds = [self childLayoutAtIndex:1].bounds;
|
||||
CGFloat y = MPFractionMiddle - kFractionFunctionLineWidth / 2;
|
||||
y -= denominatorBounds.size.height + denominatorBounds.origin.y;
|
||||
return NSMakePoint(kFractionFunctionHorizontalInset, y);
|
||||
return NSMakePoint((bounds.size.width - denominatorBounds.size.width) / 2, y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user