set pointSize, underline, font, before calculate_layout early return
This commit is contained in:
@@ -130,14 +130,13 @@ void cTextMsg::calculate_layout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cTextMsg::recalcRect() {
|
void cTextMsg::recalcRect() {
|
||||||
|
style.pointSize = textSize;
|
||||||
|
style.underline = underlined;
|
||||||
|
style.font = textFont;
|
||||||
if(fixedWidth && fixedHeight){
|
if(fixedWidth && fixedHeight){
|
||||||
calculate_layout();
|
calculate_layout();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TextStyle style;
|
|
||||||
style.font = textFont;
|
|
||||||
style.pointSize = textSize;
|
|
||||||
style.underline = underlined;
|
|
||||||
style.lineHeight = textSize + 2;
|
style.lineHeight = textSize + 2;
|
||||||
std::string test = getText();
|
std::string test = getText();
|
||||||
size_t lines = 1, cur_line_chars = 0, max_line_chars = 0;
|
size_t lines = 1, cur_line_chars = 0, max_line_chars = 0;
|
||||||
|
Reference in New Issue
Block a user