* Source/NSSegmentedCell.m (-drawSegment:inFrame:withView:):

Use centerScanRect: to position the image.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39080 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2015-10-18 16:25:53 +00:00
parent bbac2bf53c
commit f059d346a6
2 changed files with 10 additions and 0 deletions

View file

@ -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