mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 00:20:49 +00:00
Fix various issues when drawing controls with edited cells. This
includes a fix for the problem of properly resizing and redrawing the editor when the cell is resized or moved during editing (bug #22678). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29133 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
82aee08d88
commit
68b0f819f2
7 changed files with 243 additions and 149 deletions
|
@ -225,15 +225,20 @@
|
|||
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
NSRect titleRect;
|
||||
if (_cell.in_editing)
|
||||
[self _drawEditorWithFrame: cellFrame inView: controlView];
|
||||
else
|
||||
{
|
||||
NSRect titleRect;
|
||||
|
||||
/* Make sure we are a text cell; titleRect might return an incorrect
|
||||
rectangle otherwise. Note that the type could be different if the
|
||||
user has set an image on us, which we just ignore (OS X does so as
|
||||
well). */
|
||||
_cell.type = NSTextCellType;
|
||||
titleRect = [self titleRectForBounds: cellFrame];
|
||||
[[self _drawAttributedString] drawInRect: titleRect];
|
||||
/* Make sure we are a text cell; titleRect might return an incorrect
|
||||
rectangle otherwise. Note that the type could be different if the
|
||||
user has set an image on us, which we just ignore (OS X does so as
|
||||
well). */
|
||||
_cell.type = NSTextCellType;
|
||||
titleRect = [self titleRectForBounds: cellFrame];
|
||||
[[self _drawAttributedString] drawInRect: titleRect];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue