mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-01 12:00:48 +00:00
Fixed right padding of text in dialogs entries with unread reactions.
This commit is contained in:
parent
9f11c783eb
commit
1a6b6e6084
@ -175,7 +175,6 @@ int PaintWideCounter(
|
|||||||
bool unreadMuted,
|
bool unreadMuted,
|
||||||
bool mentionOrReactionMuted) {
|
bool mentionOrReactionMuted) {
|
||||||
const auto initial = availableWidth;
|
const auto initial = availableWidth;
|
||||||
auto hadOneBadge = false;
|
|
||||||
if (displayUnreadCounter || displayUnreadMark) {
|
if (displayUnreadCounter || displayUnreadMark) {
|
||||||
const auto counter = (unreadCount > 0)
|
const auto counter = (unreadCount > 0)
|
||||||
? QString::number(unreadCount)
|
? QString::number(unreadCount)
|
||||||
@ -198,8 +197,6 @@ int PaintWideCounter(
|
|||||||
unreadTop,
|
unreadTop,
|
||||||
st);
|
st);
|
||||||
availableWidth -= badge.width() + st.padding;
|
availableWidth -= badge.width() + st.padding;
|
||||||
|
|
||||||
hadOneBadge = true;
|
|
||||||
} else if (displayPinnedIcon) {
|
} else if (displayPinnedIcon) {
|
||||||
const auto &icon = active
|
const auto &icon = active
|
||||||
? st::dialogsPinnedIconActive
|
? st::dialogsPinnedIconActive
|
||||||
@ -212,8 +209,6 @@ int PaintWideCounter(
|
|||||||
texttop,
|
texttop,
|
||||||
fullWidth);
|
fullWidth);
|
||||||
availableWidth -= icon.width() + st::dialogsUnreadPadding;
|
availableWidth -= icon.width() + st::dialogsUnreadPadding;
|
||||||
|
|
||||||
hadOneBadge = true;
|
|
||||||
}
|
}
|
||||||
if (displayMentionBadge || displayReactionBadge) {
|
if (displayMentionBadge || displayReactionBadge) {
|
||||||
const auto counter = QString();
|
const auto counter = QString();
|
||||||
@ -253,7 +248,7 @@ int PaintWideCounter(
|
|||||||
: st::dialogsUnreadReaction)).paintInCenter(p, badge);
|
: st::dialogsUnreadReaction)).paintInCenter(p, badge);
|
||||||
availableWidth -= badge.width()
|
availableWidth -= badge.width()
|
||||||
+ st.padding
|
+ st.padding
|
||||||
+ (hadOneBadge ? st::dialogsUnreadPadding : 0);
|
+ st::dialogsUnreadPadding;
|
||||||
}
|
}
|
||||||
return availableWidth;
|
return availableWidth;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user