mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 10:42:19 +00:00
Fixed: Added underline support in CPTextView (#2875)
This commit is contained in:
1 parent
fed0703ecf
commit
58c08cebd7
4 files changed
+55
-18
No files matched your search
@@ -1922,14 +1922,14 @@ Sets the selection to a range of characters in response to user action.
|
||||
if ([attrib containsKey:CPUnderlineStyleAttributeName] && [[attrib objectForKey:CPUnderlineStyleAttributeName] intValue])
|
||||
[_textStorage removeAttribute:CPUnderlineStyleAttributeName range:_selectionRange];
|
||||
else
|
||||
[_textStorage addAttribute:CPUnderlineStyleAttributeName value:[CPNumber numberWithInt:1] range:CPMakeRangeCopy(_selectionRange)];
|
||||
[_textStorage addAttribute:CPUnderlineStyleAttributeName value:CPUnderlineStyleSingle range:CPMakeRangeCopy(_selectionRange)];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([_typingAttributes containsKey:CPUnderlineStyleAttributeName] && [[_typingAttributes objectForKey:CPUnderlineStyleAttributeName] intValue])
|
||||
[_typingAttributes setObject:[CPNumber numberWithInt:0] forKey:CPUnderlineStyleAttributeName];
|
||||
[_typingAttributes setObject:CPUnderlineStyleNone forKey:CPUnderlineStyleAttributeName];
|
||||
else
|
||||
[_typingAttributes setObject:[CPNumber numberWithInt:1] forKey:CPUnderlineStyleAttributeName];
|
||||
[_typingAttributes setObject:CPUnderlineStyleSingle forKey:CPUnderlineStyleAttributeName];
|
||||
}
|
||||
|
||||
[_layoutManager textStorage:_textStorage edited:0 range:CPMakeRangeCopy(_selectionRange) changeInLength:0 invalidatedRange:CPMakeRangeCopy(_selectionRange)];
|
||||
|
||||
Reference in new issue
Block a user