Author: fredkiefer
Date: Sun Oct 18 18:25:53 2015
New Revision: 39080
URL: http://svn.gna.org/viewcvs/gnustep?rev=39080&view=rev
Log:
* Source/NSSegmentedCell.m (-drawSegment:inFrame:withView:):
Use centerScanRect: to position the image.
Modified:
libs/gui/trunk/ChangeLog
libs/gui/trunk/Source/NSSegmentedCell.m
Modified: libs/gui/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=39080&r1=39079&r2=39080&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog (original)
+++ libs/gui/trunk/ChangeLog Sun Oct 18 18:25:53 2015
@@ -1,3 +1,8 @@
+2015-10-18 Fred Kiefer <[email protected]>
+
+ * Source/NSSegmentedCell.m (-drawSegment:inFrame:withView:):
+ Use centerScanRect: to position the image.
+
2015-10-17 Fred Kiefer <[email protected]>
* Source/NSAttributedString.m (-_substituteFontFor:font:): Use
Modified: libs/gui/trunk/Source/NSSegmentedCell.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSSegmentedCell.m?rev=39080&r1=39079&r2=39080&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSSegmentedCell.m (original)
+++ libs/gui/trunk/Source/NSSegmentedCell.m Sun Oct 18 18:25:53 2015
@@ -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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs