diff --git a/ChangeLog b/ChangeLog index 915bc88db..f9ce07c5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-10-18 Fred Kiefer + + * Source/NSSegmentedCell.m (-drawSegment:inFrame:withView:): + Use centerScanRect: to position the image. + 2015-10-17 Fred Kiefer * Source/NSAttributedString.m (-_substituteFontFor:font:): Use diff --git a/Source/NSSegmentedCell.m b/Source/NSSegmentedCell.m index e341c7cdc..ea709abdf 100644 --- a/Source/NSSegmentedCell.m +++ b/Source/NSSegmentedCell.m @@ -595,6 +595,11 @@ position.y = MAX(NSMidY(frame) - (size.height/2.), 0.); destinationRect = NSMakeRect(position.x, position.y, size.width, size.height); + if (nil != view) + { + destinationRect = [view centerScanRect: destinationRect]; + } + [segmentImage drawInRect: destinationRect fromRect: NSZeroRect operation: NSCompositeSourceOver