fix EidtBox mac 32bit compile error

This commit is contained in:
andyque 2014-07-24 17:56:28 +08:00
parent 9b82453df4
commit e9ab6bb5cd
1 changed files with 2 additions and 2 deletions

View File

@ -324,7 +324,7 @@ void EditBoxImplMac::setPlaceholderFont(const char* pFontName, int fontSize)
return;
}
_sysEdit.placeholderAttributes[NSFontAttributeName] = font;
[_sysEdit.placeholderAttributes setObject:font forKey:NSFontAttributeName];
/* reload placeholder */
const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String;
@ -343,7 +343,7 @@ void EditBoxImplMac::setFontColor(const Color3B& color)
void EditBoxImplMac::setPlaceholderFontColor(const Color3B& color)
{
NSColor *nsColor = [NSColor colorWithCalibratedRed:color.r/255.f green:color.g / 255.f blue:color.b / 255.f alpha:1.0f];
_sysEdit.placeholderAttributes[NSForegroundColorAttributeName] = nsColor;
[_sysEdit.placeholderAttributes setObject:nsColor forKey:NSForegroundColorAttributeName];
/* reload placeholder */
const char *placeholder = [_sysEdit.textField.cell placeholderAttributedString].string.UTF8String;