Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Nov 18, 2024
1 parent 637b297 commit fee66e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/gui/friendchatboard/chatitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ ChatItem::ChatItem(
0,
0,

ChatItem::MESSAGE_MARGIN * 2 + std::max<int>(message.w(), ChatItem::MESSAGE_MIN_WIDTH ) + ChatItem::TRIANGLE_WIDTH,
ChatItem::MESSAGE_MARGIN * 2 + std::max<int>(message.h(), ChatItem::MESSAGE_MIN_HEIGHT),
[this](const Widget *){ return ChatItem::MESSAGE_MARGIN * 2 + std::max<int>(message.w(), ChatItem::MESSAGE_MIN_WIDTH ) + ChatItem::TRIANGLE_WIDTH; },
[this](const Widget *){ return ChatItem::MESSAGE_MARGIN * 2 + std::max<int>(message.h(), ChatItem::MESSAGE_MIN_HEIGHT) ; },

[this](const Widget *, int drawDstX, int drawDstY)
{
Expand Down Expand Up @@ -230,8 +230,9 @@ ChatItem::ChatItem(
}
}
else{
const auto realWidth = ChatItem::AVATAR_WIDTH + ChatItem::GAP + ChatItem::TRIANGLE_WIDTH + std::max<int>({
name.w(),
const auto realWidth = ChatItem::AVATAR_WIDTH + ChatItem::GAP + ChatItem::TRIANGLE_WIDTH + std::max<int>
({
showName ? name.w() : 0,
std::max<int>(message.w(), ChatItem::MESSAGE_MIN_WIDTH) + ChatItem::MESSAGE_MARGIN * 2,
msgref ? msgref->w() : 0,
});
Expand Down

0 comments on commit fee66e3

Please sign in to comment.