Skip to content

Commit c6224d1

Browse files
authored
[uibutton] fix size init order (#19260)
1 parent 451d913 commit c6224d1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: cocos/editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -878,9 +878,7 @@ namespace cocostudio
878878
Color3B titleColor(textColor->r(), textColor->g(), textColor->b());
879879
button->setTitleColor(titleColor);
880880

881-
int titleFontSize = options->fontSize();
882-
button->setTitleFontSize(titleFontSize);
883-
881+
884882
std::string titleFontName = options->fontName()->c_str();
885883
button->setTitleFontName(titleFontName);
886884

@@ -905,6 +903,9 @@ namespace cocostudio
905903
}
906904
}
907905

906+
int titleFontSize = options->fontSize();
907+
button->setTitleFontSize(titleFontSize);
908+
908909
bool displaystate = options->displaystate() != 0;
909910
button->setBright(displaystate);
910911
button->setEnabled(displaystate);

0 commit comments

Comments
 (0)