mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:27:40 +00:00
Check in the control not in the text field whether the cell is currently
being edited. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26613 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b4d065a9bf
commit
1a9a9468c0
4 changed files with 40 additions and 32 deletions
|
@ -235,31 +235,20 @@ static NSColor *txtCol;
|
|||
|
||||
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
{
|
||||
/* Do nothing if there is already a text editor doing the drawing;
|
||||
* otherwise, we draw everything twice. That is bad if there are
|
||||
* any transparency involved (eg, even an anti-alias font!) because
|
||||
* if the semi-transparent pixels are drawn over themselves they
|
||||
* become less transparent (eg, an anti-alias font becomes darker
|
||||
* and gives the impression of being bold).
|
||||
*/
|
||||
if (([controlView respondsToSelector: @selector(currentEditor)] == NO)
|
||||
|| ([(NSTextField *)controlView currentEditor] == nil))
|
||||
{
|
||||
if (_textfieldcell_draws_background)
|
||||
{
|
||||
if ([self isEnabled])
|
||||
{
|
||||
[_background_color set];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[NSColor controlBackgroundColor] set];
|
||||
}
|
||||
NSRectFill([self drawingRectForBounds: cellFrame]);
|
||||
}
|
||||
|
||||
[super drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
if (_textfieldcell_draws_background)
|
||||
{
|
||||
if ([self isEnabled])
|
||||
{
|
||||
[_background_color set];
|
||||
}
|
||||
else
|
||||
{
|
||||
[[NSColor controlBackgroundColor] set];
|
||||
}
|
||||
NSRectFill([self drawingRectForBounds: cellFrame]);
|
||||
}
|
||||
|
||||
[super drawInteriorWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue