Corrected Fractions' property name: nominator to numerator
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user