diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index b1c2bfb3e..5a7aa8f2c 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -1819,24 +1819,6 @@ void Message::drawInfo( const auto viewIconTop = infoBottom + st::historyViewsTop; const auto pinIconTop = infoBottom + st::historyPinTop; auto left = infoRight - infoW; - if (displayPinIcon()) { - const auto icon = [&] { - if (outbg) { - return &(invertedsprites - ? st::historyPinInvertedIcon - : selected - ? st::historyPinOutSelectedIcon - : st::historyPinOutIcon); - } - return &(invertedsprites - ? st::historyPinInvertedIcon - : selected - ? st::historyPinInSelectedIcon - : st::historyPinInIcon); - }(); - icon->paint(p, left, pinIconTop, width); - left += st::historyViewsWidth; - } if (auto views = item->Get()) { const auto textTop = infoBottom - st::msgDateFont->descent; if (views->replies.count > 0 @@ -1899,11 +1881,32 @@ void Message::drawInfo( auto iconSkip = st::historyViewsSpace + views->views.textWidth; icon->paint(p, left + iconSkip, viewIconTop, width); } + left += st::historyViewsSpace + + views->views.textWidth + + st::historyViewsWidth; } } else if (item->id < 0 && item->history()->peer->isSelf() && !outbg) { auto icon = &(invertedsprites ? st::historyViewsSendingInvertedIcon : st::historyViewsSendingIcon); icon->paint(p, left, viewIconTop, width); } + if (displayPinIcon()) { + const auto icon = [&] { + if (outbg) { + return &(invertedsprites + ? st::historyPinInvertedIcon + : selected + ? st::historyPinOutSelectedIcon + : st::historyPinOutIcon); + } + return &(invertedsprites + ? st::historyPinInvertedIcon + : selected + ? st::historyPinInSelectedIcon + : st::historyPinInIcon); + }(); + icon->paint(p, left, pinIconTop, width); + left += st::historyPinWidth; + } if (outbg) { auto icon = [&] { if (item->id > 0) { @@ -1971,7 +1974,7 @@ int Message::infoWidth() const { } } if (displayPinIcon()) { - result += st::historyViewsWidth; + result += st::historyPinWidth; } // When message is scheduled until online, time is not displayed, @@ -2023,7 +2026,7 @@ int Message::timeLeft() const { } } if (displayPinIcon()) { - result += st::historyViewsWidth; + result += st::historyPinWidth; } return result; } diff --git a/Telegram/SourceFiles/ui/chat/chat.style b/Telegram/SourceFiles/ui/chat/chat.style index 06d976453..855fd3d94 100644 --- a/Telegram/SourceFiles/ui/chat/chat.style +++ b/Telegram/SourceFiles/ui/chat/chat.style @@ -173,8 +173,9 @@ historyReceivedInvertedIcon: icon {{ "history_received", historyIconFgInverted, historyScheduledUntilOnlineStateSpace: 17px; -historyViewsSpace: 11px; +historyViewsSpace: 8px; historyViewsWidth: 20px; +historyPinWidth: 24px; historyViewsTop: -15px; historyViewsInIcon: icon {{ "history_views", msgInDateFg }}; historyViewsInSelectedIcon: icon {{ "history_views", msgInDateFgSelected }};