mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-02 20:38:12 +00:00
Use red chats list badge for unread reactions.
This commit is contained in:
parent
6daa267329
commit
d15af0c5f0
Binary file not shown.
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 341 B |
Binary file not shown.
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 533 B |
Binary file not shown.
Before Width: | Height: | Size: 814 B After Width: | Height: | Size: 787 B |
@ -129,6 +129,9 @@ void PaintNarrowCounter(
|
||||
- st::dialogsUnreadHeight;
|
||||
|
||||
UnreadBadgeStyle st;
|
||||
st.sizeId = displayMentionBadge
|
||||
? UnreadBadgeInDialogs
|
||||
: UnreadBadgeReactionInDialogs;
|
||||
st.active = active;
|
||||
st.selected = selected;
|
||||
st.muted = mentionOrReactionMuted;
|
||||
@ -221,6 +224,9 @@ int PaintWideCounter(
|
||||
- (st::dialogsUnreadHeight - st::dialogsUnreadFont->height) / 2;
|
||||
|
||||
UnreadBadgeStyle st;
|
||||
st.sizeId = displayMentionBadge
|
||||
? UnreadBadgeInDialogs
|
||||
: UnreadBadgeReactionInDialogs;
|
||||
st.active = active;
|
||||
st.selected = selected;
|
||||
st.muted = mentionOrReactionMuted;
|
||||
@ -618,6 +624,14 @@ public:
|
||||
st::dialogsUnreadBgMutedOver,
|
||||
st::dialogsUnreadBgMutedActive
|
||||
};
|
||||
style::color reactionBg[6] = {
|
||||
st::dialogsDraftFg,
|
||||
st::dialogsDraftFgOver,
|
||||
st::dialogsDraftFgActive,
|
||||
st::dialogsUnreadBgMuted,
|
||||
st::dialogsUnreadBgMutedOver,
|
||||
st::dialogsUnreadBgMutedActive
|
||||
};
|
||||
rpl::lifetime lifetime;
|
||||
};
|
||||
Data::GlobalStructurePointer<UnreadBadgeStyleData> unreadBadgeStyle;
|
||||
@ -660,7 +674,9 @@ void PaintUnreadBadge(Painter &p, const QRect &rect, const UnreadBadgeStyle &st)
|
||||
Assert(st.sizeId < UnreadBadgeSizesCount);
|
||||
badgeData = &unreadBadgeStyle->sizes[st.sizeId];
|
||||
}
|
||||
auto bg = unreadBadgeStyle->bg[index];
|
||||
auto bg = (st.sizeId == UnreadBadgeReactionInDialogs)
|
||||
? unreadBadgeStyle->reactionBg[index]
|
||||
: unreadBadgeStyle->bg[index];
|
||||
if (badgeData->left[index].isNull()) {
|
||||
int imgsize = size * cIntRetinaFactor(), imgsizehalf = sizehalf * cIntRetinaFactor();
|
||||
createCircleMask(badgeData, size);
|
||||
|
@ -68,6 +68,7 @@ enum UnreadBadgeSize {
|
||||
UnreadBadgeInStickersPanel,
|
||||
UnreadBadgeInStickersBox,
|
||||
UnreadBadgeInTouchBar,
|
||||
UnreadBadgeReactionInDialogs,
|
||||
|
||||
UnreadBadgeSizesCount
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user