mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 11:50:48 +00:00
* 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:
parent
bbac2bf53c
commit
f059d346a6
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue