Fix UIButton setFontSize sync ContentSize

This commit is contained in:
Ahlwong 2014-10-10 11:17:43 -07:00
parent 5027f24348
commit 4aceaee08c
1 changed files with 4 additions and 0 deletions

View File

@ -665,6 +665,10 @@ void Button::setTitleFontSize(float size)
config.fontSize = size;
_titleRenderer->setTTFConfig(config);
}
if (_ignoreSize) {
Size s = getVirtualRendererSize();
this->setContentSize(s);
}
_fontSize = size;
}