mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 05:50:37 +00:00
Change drawing of text field cells so that they can display multiple
lines of text. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29132 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93c18dfe7d
commit
f3c7d70152
2 changed files with 24 additions and 5 deletions
|
@ -223,10 +223,23 @@
|
|||
[self _drawBackgroundWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
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];
|
||||
}
|
||||
|
||||
/*
|
||||
Attributed string that will be displayed.
|
||||
*/
|
||||
- (NSAttributedString*)_drawAttributedString
|
||||
- (NSAttributedString*) _drawAttributedString
|
||||
{
|
||||
NSAttributedString *attrStr;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue