* Headers/AppKit/NSImageCell.h:

* Headers/AppKit/NSCell.h: Move NSImageScaling constants to NSCell
* Source/NSImageCell.m:
* Source/NSCell.m: Refactor the image scaling logic to a private
method in NSCell, -_scaleImageWithSize:toFitInSize:scalingType:
which can be share by NSImageCell, NSButtonCell, and any other
cell classes that need it.
* Source/NSButtonCell.m:
* Headers/AppKit/NSButtonCell.h: Implement -imageScaling and
-setImageScaling methods. 
* Source/GSThemeDrawing.m:
* Headers/Additions/GNUstepGUI/GSTheme.h: Remove the
-drawImage:inButtonCell:withFrame:position: API intended
to let themes substitute images right before drawing,
as IMHO it's the wrong place to hook in new images (by
the time this method was caleld, sizing/positionging
was already done).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34160 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Eric Wasylishen 2011-11-11 23:10:15 +00:00
parent 45d5c38825
commit 60674d5076
9 changed files with 202 additions and 119 deletions

View file

@ -877,16 +877,6 @@ APPKIT_EXPORT NSString *GSThemeWillDeactivateNotification;
roundedLeft: (BOOL)roundedLeft
roundedRight: (BOOL)roundedRight;
/**
* In some themes it may be necessary to override the drawing
* of an image a button cell and replace it with a rendered
* version (from the native theme).
*/
- (void) drawImage: (NSImage *)image
inButtonCell: (NSButtonCell *) cell
withFrame: (NSRect) aRect
position: (NSPoint) position;
- (void) drawBackgroundForMenuView: (NSMenuView*)menuView
withFrame: (NSRect)bounds
dirtyRect: (NSRect)dirtyRect