Author: gcasa
Date: Thu Aug 21 04:52:06 2014
New Revision: 38049
URL: http://svn.gna.org/viewcvs/gnustep?rev=38049&view=rev
Log:
Change return of -drawTitle:withFrame:inView to NSRect instead of void.
Modified:
libs/gui/trunk/ChangeLog
libs/gui/trunk/Headers/AppKit/NSButtonCell.h
libs/gui/trunk/Source/NSButtonCell.m
Modified: libs/gui/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38049&r1=38048&r2=38049&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog (original)
+++ libs/gui/trunk/ChangeLog Thu Aug 21 04:52:06 2014
@@ -1,3 +1,10 @@
+2014-08-20 22:49-EDT Gregory John Casamento <[email protected]>
+
+ * Headers/AppKit/NSButtonCell.h
+ * Source/NSButtonCell.m: Change return type of -drawTitle:withFrame:
+ inView: to NSRect instead of void per Cocoa documentation.
+
+
2014-08-18 12:14-EDT Gregory John Casamento <[email protected]>
* Source/NSWindow.m: Change code in
Modified: libs/gui/trunk/Headers/AppKit/NSButtonCell.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Headers/AppKit/NSButtonCell.h?rev=38049&r1=38048&r2=38049&view=diff
==============================================================================
--- libs/gui/trunk/Headers/AppKit/NSButtonCell.h (original)
+++ libs/gui/trunk/Headers/AppKit/NSButtonCell.h Thu Aug 21 04:52:06 2014
@@ -213,9 +213,9 @@
- (void) drawImage: (NSImage*)imageToDisplay
withFrame: (NSRect)cellFrame
inView: (NSView *)controlView;
-- (void) drawTitle: (NSAttributedString*)titleToDisplay
- withFrame: (NSRect)cellFrame
- inView: (NSView *)controlView;
+- (NSRect) drawTitle: (NSAttributedString*)titleToDisplay
+ withFrame: (NSRect)cellFrame
+ inView: (NSView *)controlView;
#endif
//
Modified: libs/gui/trunk/Source/NSButtonCell.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSButtonCell.m?rev=38049&r1=38048&r2=38049&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSButtonCell.m (original)
+++ libs/gui/trunk/Source/NSButtonCell.m Thu Aug 21 04:52:06 2014
@@ -1068,12 +1068,16 @@
}
}
-- (void) drawTitle: (NSAttributedString*)titleToDisplay
- withFrame: (NSRect)cellFrame
- inView: (NSView*)controlView
+- (NSRect) drawTitle: (NSAttributedString*)titleToDisplay
+ withFrame: (NSRect)cellFrame
+ inView: (NSView*)controlView
{
[self _drawAttributedText: titleToDisplay
inFrame: cellFrame];
+
+ return [titleToDisplay
+ boundingRectWithSize: cellFrame.size
+ options: NSStringDrawingUsesLineFragmentOrigin];
}
// Private helper method overridden in subclasses
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs