Fix layout for RTL messages.

This commit is contained in:
John Preston
2026-04-17 10:53:20 +07:00
parent 66b38ccb5f
commit 5eed8136dd
@@ -2321,11 +2321,10 @@ void Message::paintText(
});
}
const auto realWidth = textRealWidth();
auto highlightRequest = context.computeHighlightCache();
text().draw(p, {
.position = trect.topLeft(),
.availableWidth = realWidth ? realWidth : trect.width(),
.availableWidth = std::max(textRealWidth(), trect.width()),
.palette = &stm->textPalette,
.pre = stm->preCache.get(),
.blockquote = context.quoteCache(
@@ -3644,7 +3643,7 @@ bool Message::getStateText(
if (base::in_range(point.y(), trect.y(), trect.y() + trect.height())) {
*outResult = TextState(item, text().getState(
point - trect.topLeft(),
trect.width(),
std::max(textRealWidth(), trect.width()),
request.forText()));
if (outResult->link
&& IsRippleLink(outResult->link)