mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix layout for RTL messages.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user