mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Move pin icon to the right.
This commit is contained in:
parent
ea6821aca2
commit
2233058ae0
2 changed files with 25 additions and 21 deletions
|
@ -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<HistoryMessageViews>()) {
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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 }};
|
||||
|
|
Loading…
Add table
Reference in a new issue