提交 b63ba643 编写于 作者: O openharmony_ci 提交者: Gitee

!298 UILabel自适应模式下旋转后宽高有误

Merge pull request !298 from wangtiantian/bug_label_r
......@@ -300,6 +300,11 @@ void UILabel::ReMeasure()
InitLabelText();
Style style = GetStyleConst();
style.textColor_ = GetTextColor();
bool flag = false;
if ((transMap_ != nullptr) && !transMap_->IsInvalid()) {
transMap_->SetInvalid(true);
flag = true;
}
labelText_->ReMeasureTextSize(GetContentRect(), style);
Point textSize = labelText_->GetTextSize();
switch (lineBreakMode_) {
......@@ -322,6 +327,9 @@ void UILabel::ReMeasure()
default:
break;
}
if ((transMap_ != nullptr) && flag) {
transMap_->SetInvalid(false);
}
}
void UILabel::RemeasureForMarquee(int16_t textWidth)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册