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();
|
auto highlightRequest = context.computeHighlightCache();
|
||||||
text().draw(p, {
|
text().draw(p, {
|
||||||
.position = trect.topLeft(),
|
.position = trect.topLeft(),
|
||||||
.availableWidth = realWidth ? realWidth : trect.width(),
|
.availableWidth = std::max(textRealWidth(), trect.width()),
|
||||||
.palette = &stm->textPalette,
|
.palette = &stm->textPalette,
|
||||||
.pre = stm->preCache.get(),
|
.pre = stm->preCache.get(),
|
||||||
.blockquote = context.quoteCache(
|
.blockquote = context.quoteCache(
|
||||||
@@ -3644,7 +3643,7 @@ bool Message::getStateText(
|
|||||||
if (base::in_range(point.y(), trect.y(), trect.y() + trect.height())) {
|
if (base::in_range(point.y(), trect.y(), trect.y() + trect.height())) {
|
||||||
*outResult = TextState(item, text().getState(
|
*outResult = TextState(item, text().getState(
|
||||||
point - trect.topLeft(),
|
point - trect.topLeft(),
|
||||||
trect.width(),
|
std::max(textRealWidth(), trect.width()),
|
||||||
request.forText()));
|
request.forText()));
|
||||||
if (outResult->link
|
if (outResult->link
|
||||||
&& IsRippleLink(outResult->link)
|
&& IsRippleLink(outResult->link)
|
||||||
|
|||||||
Reference in New Issue
Block a user