Archived
1

Cleaned Code by Removing Location Tracking for Errors

This commit is contained in:
Kim Wittenburg
2014-11-07 19:50:28 +01:00
parent 91e7dbe9f2
commit 139a75f816
59 changed files with 355 additions and 532 deletions

View File

@@ -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);
}
}