提交 c17eb50a 编写于 作者: W wangtiantian 提交者: Gitee

IssueNo:https://gitee.com/openharmony/graphic_ui/issues/I41WTD

Description:fix uilabel bug
Sig:graphic
Feature or Bugfix:Bugfix
Binary Source:No
Signed-off-by: Nwangtiantian <wangtiantian19@huawei.com>
上级 20e7417a
...@@ -300,6 +300,11 @@ void UILabel::ReMeasure() ...@@ -300,6 +300,11 @@ void UILabel::ReMeasure()
InitLabelText(); InitLabelText();
Style style = GetStyleConst(); Style style = GetStyleConst();
style.textColor_ = GetTextColor(); style.textColor_ = GetTextColor();
bool flag = false;
if ((transMap_ != nullptr) && !transMap_->IsInvalid()) {
transMap_->SetInvalid(true);
flag = true;
}
labelText_->ReMeasureTextSize(GetContentRect(), style); labelText_->ReMeasureTextSize(GetContentRect(), style);
Point textSize = labelText_->GetTextSize(); Point textSize = labelText_->GetTextSize();
switch (lineBreakMode_) { switch (lineBreakMode_) {
...@@ -322,6 +327,9 @@ void UILabel::ReMeasure() ...@@ -322,6 +327,9 @@ void UILabel::ReMeasure()
default: default:
break; break;
} }
if ((transMap_ != nullptr) && flag) {
transMap_->SetInvalid(false);
}
} }
void UILabel::RemeasureForMarquee(int16_t textWidth) void UILabel::RemeasureForMarquee(int16_t textWidth)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册