Archived
1

Corrected Fractions' property name: nominator to numerator

This commit is contained in:
Kim Wittenburg
2015-01-09 15:58:15 +01:00
parent 1f7e924c19
commit 1a8dd6e901
7 changed files with 31 additions and 32 deletions

View File

@@ -50,9 +50,9 @@
{
NSRect bounds = self.bounds;
if (index == 0) {
NSRect nominatorBounds = [self childLayoutAtIndex:0].bounds;
CGFloat y = MPFractionMiddle + kFractionFunctionLineWidth / 2 - nominatorBounds.origin.y;
return NSMakePoint((bounds.size.width - nominatorBounds.size.width) / 2, y);
NSRect numeratorBounds = [self childLayoutAtIndex:0].bounds;
CGFloat y = MPFractionMiddle + kFractionFunctionLineWidth / 2 - numeratorBounds.origin.y;
return NSMakePoint((bounds.size.width - numeratorBounds.size.width) / 2, y);
} else {
NSRect denominatorBounds = [self childLayoutAtIndex:1].bounds;
CGFloat y = MPFractionMiddle - kFractionFunctionLineWidth / 2;
@@ -80,13 +80,13 @@
- (NSRect)generateBounds
{
NSRect nominatorBounds = [self childLayoutAtIndex:0].bounds;
NSRect numeratorBounds = [self childLayoutAtIndex:0].bounds;
NSRect denominatorBounds = [self childLayoutAtIndex:1].bounds;
NSRect bounds;
bounds.origin.x = 0;
bounds.origin.y = MPFractionMiddle - kFractionFunctionLineWidth / 2 - denominatorBounds.size.height;
bounds.size.width = MAX(nominatorBounds.size.width, denominatorBounds.size.width) + 2 * kFractionFunctionHorizontalInset;
bounds.size.height = nominatorBounds.size.height + denominatorBounds.size.height + kFractionFunctionLineWidth;
bounds.size.width = MAX(numeratorBounds.size.width, denominatorBounds.size.width) + 2 * kFractionFunctionHorizontalInset;
bounds.size.height = numeratorBounds.size.height + denominatorBounds.size.height + kFractionFunctionLineWidth;
return bounds;
}