提交 0c537766 编写于 作者: O openharmony_ci 提交者: Gitee

!335 UILabel省略号位置计算有误

Merge pull request !335 from wangtiantian/bug_label_r2
......@@ -374,6 +374,9 @@ uint16_t Text::GetLetterIndexByPosition(const Rect& textRect, const Style& style
y += lineHeight;
lineStart = nextLineStart;
}
if (nextLineStart == textLen) {
return TEXT_ELLIPSIS_END_INV;
}
/* Calculate the x coordinate */
width = pos.x;
lineStart += UIFontAdaptor::GetNextLineAndWidth(&text_[lineStart], style.letterSpace_, width, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册