mirror of https://github.com/axmolengine/axmol.git
Fix UIButton setFontSize sync ContentSize
This commit is contained in:
parent
5027f24348
commit
4aceaee08c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue