mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 06:40:47 +00:00
Extract cell border drawing into helper method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24928 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e93c75500d
commit
0ccb895f2b
5 changed files with 45 additions and 66 deletions
|
@ -59,6 +59,11 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
|||
}
|
||||
}
|
||||
|
||||
+ (NSFocusRingType) defaultFocusRingType
|
||||
{
|
||||
return NSFocusRingTypeNone;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
[super init];
|
||||
|
@ -742,24 +747,9 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
|||
}
|
||||
}
|
||||
|
||||
- (void) drawWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
// Save last view drawn to
|
||||
if (_control_view != controlView)
|
||||
_control_view = controlView;
|
||||
|
||||
// Transparent buttons never draw
|
||||
if (_buttoncell_is_transparent)
|
||||
return;
|
||||
|
||||
// Do nothing if cell's frame rect is zero
|
||||
if (NSIsEmptyRect(cellFrame))
|
||||
return;
|
||||
|
||||
// Draw the border if needed
|
||||
[self drawBorderAndBackgroundWithFrame: cellFrame inView: controlView];
|
||||
|
||||
[self drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue