* Source/NSLayoutManager.m: (-drawBackgroundForGlyphRange:atPoint):

Use the text view's selected text attributes. Remove TODO.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24680 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
stoyan 2007-02-21 23:47:58 +00:00
parent 3dd9ac9a4f
commit 1a7034e596

View file

@ -1225,6 +1225,7 @@ container
NSRange r = [self glyphRangeForCharacterRange: _selected_range
actualCharacterRange: NULL];
NSRange sel = r;
NSTextView *ftv;
if (r.location < range.location)
{
@ -1240,8 +1241,14 @@ container
r.length = range.location + range.length - r.location;
}
/* TODO: use the text view's selected text attributes */
color = [NSColor selectedTextBackgroundColor];
/* Use the text view's selected text attributes */
if ((ftv = [self firstTextView]))
color = [[ftv selectedTextAttributes]
objectForKey:NSBackgroundColorAttributeName];
if (!color)
color = [NSColor selectedTextBackgroundColor];
if (!color)
return;