fix gui reader

This commit is contained in:
andyque 2014-06-26 17:29:07 +08:00
parent 11f6cf3b5b
commit d06ca0e75d
2 changed files with 10 additions and 9 deletions

View File

@ -260,14 +260,6 @@ std::string WidgetPropertiesReader::getWidgetReaderClassName(Widget* widget)
{
readerName = "TextFieldReader";
}
else if (dynamic_cast<Layout*>(widget))
{
readerName = "LayoutReader";
}
else if (dynamic_cast<ScrollView*>(widget))
{
readerName = "ScrollViewReader";
}
else if (dynamic_cast<ListView*>(widget))
{
readerName = "ListViewReader";
@ -276,6 +268,15 @@ std::string WidgetPropertiesReader::getWidgetReaderClassName(Widget* widget)
{
readerName = "PageViewReader";
}
else if (dynamic_cast<ScrollView*>(widget))
{
readerName = "ScrollViewReader";
}
else if (dynamic_cast<Layout*>(widget))
{
readerName = "LayoutReader";
}
else if (dynamic_cast<Widget*>(widget))
{
readerName = "WidgetReader";

View File

@ -354,7 +354,7 @@ void Text::copySpecialProperties(Widget *widget)
if (label)
{
setFontName(label->_fontName);
setFontSize(label->_labelRenderer->getSystemFontSize());
setFontSize(label->getFontSize());
setString(label->getString());
setTouchScaleChangeEnabled(label->_touchScaleChangeEnabled);
setTextHorizontalAlignment(label->_labelRenderer->getHorizontalAlignment());