Verify transparent reaction footer clicks across text and media layouts
This commit is contained in:
1 parent
fc79fa7345
commit
4f0870b961
2 files changed
+73
-1
No files matched your search
@@ -410,7 +410,8 @@ MessageDelegate::Layout MessageDelegate::calcLayout(
|
||||
|| index.data(MsgMessageKeyRole).toString().size() != 64 || layout.bubbleRect.isEmpty()) return layout;
|
||||
QFont font = option.font; font.setPointSize(qMax(1, font.pointSize() - 1));
|
||||
const int height = qMax(28, QFontMetrics(font).height() + 8), left = layout.bubbleRect.left();
|
||||
int y = layout.bubbleRect.bottom() + 4, x = left + height + 4;
|
||||
int y = qMax(layout.bubbleRect.bottom(), qMax(layout.statusRect.bottom(), layout.deliveryRect.bottom())) + 4;
|
||||
int x = left + height + 4;
|
||||
layout.reactionHeart = QRect(left, y, height, height);
|
||||
for (const auto& value : index.data(MsgReactionsRole).toList()) {
|
||||
const auto reaction = value.toMap();
|
||||
@@ -435,6 +436,7 @@ MessageDelegate::Layout MessageDelegate::calcBodyLayout(
|
||||
if (v) L.viewWidth = v->viewport()->width();
|
||||
}
|
||||
if (L.viewWidth <= 0) L.viewWidth = 300;
|
||||
L.narrow = L.viewWidth - 2 * kMarginH - kAvatar - kGap < 400;
|
||||
|
||||
bool hasQuote = index.data(MsgHasQuoteRole).toBool();
|
||||
QString text = index.data(MsgTextRole).toString();
|
||||
|
||||
Reference in new issue
Block a user