Show faved stickers in StickersListWidget.
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 692 B |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 501 B After Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 628 B After Width: | Height: | Size: 644 B |
Before Width: | Height: | Size: 668 B After Width: | Height: | Size: 694 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 986 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 432 B After Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 836 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 562 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -103,7 +103,7 @@ stickersRowDuration: 200;
|
|||
|
||||
stickersSettings: icon {{ "emoji_settings", emojiIconFg }};
|
||||
stickersTrending: icon {{ "emoji_trending", emojiIconFg }};
|
||||
stickersTrendingActive: icon {{ "emoji_trending", emojiIconFgActive }};
|
||||
stickersFaved: icon {{ "emoji_faved", emojiIconFg }};
|
||||
|
||||
stickersSettingsUnreadSize: 17px;
|
||||
stickersSettingsUnreadPosition: point(4px, 5px);
|
||||
|
@ -137,7 +137,7 @@ emojiCategory: IconButton {
|
|||
width: 42px;
|
||||
height: 46px;
|
||||
|
||||
iconPosition: point(11px, 12px);
|
||||
iconPosition: point(10px, 11px);
|
||||
}
|
||||
emojiCategoryRecent: IconButton(emojiCategory) { icon: emojiRecent; }
|
||||
emojiCategoryPeople: IconButton(emojiCategory) { icon: emojiPeople; }
|
||||
|
|
|
@ -208,13 +208,15 @@ void StickersListWidget::Footer::paintEvent(QPaintEvent *e) {
|
|||
|
||||
p.drawPixmapLeft(x + (st::emojiCategory.width - icon.pixw) / 2, _iconsTop + (st::emojiCategory.height - icon.pixh) / 2, width(), pix);
|
||||
} else {
|
||||
auto getSpecialSetIcon = [](uint64 setId, bool active) {
|
||||
auto getSpecialSetIcon = [](uint64 setId) {
|
||||
if (setId == Stickers::FeaturedSetId) {
|
||||
return active ? &st::stickersTrendingActive : &st::stickersTrending;
|
||||
return &st::stickersTrending;
|
||||
} else if (setId == Stickers::FavedSetId) {
|
||||
return &st::stickersFaved;
|
||||
}
|
||||
return active ? &st::emojiRecentActive : &st::emojiRecent;
|
||||
return &st::emojiRecent;
|
||||
};
|
||||
getSpecialSetIcon(icon.setId, false)->paint(p, x + st::emojiCategory.iconPosition.x(), _iconsTop + st::emojiCategory.iconPosition.y(), width());
|
||||
getSpecialSetIcon(icon.setId)->paint(p, x + st::emojiCategory.iconPosition.x(), _iconsTop + st::emojiCategory.iconPosition.y(), width());
|
||||
if (icon.setId == Stickers::FeaturedSetId) {
|
||||
paintFeaturedStickerSetsBadge(p, x);
|
||||
}
|
||||
|
@ -1189,16 +1191,19 @@ void StickersListWidget::fillIcons(QList<StickerIcon> &icons) {
|
|||
icons.push_back(StickerIcon(Stickers::FeaturedSetId));
|
||||
}
|
||||
|
||||
if (!_mySets.isEmpty()) {
|
||||
int i = 0;
|
||||
if (_mySets[0].id == Stickers::RecentSetId) {
|
||||
auto i = 0;
|
||||
if (i != _mySets.size() && _mySets[i].id == Stickers::RecentSetId) {
|
||||
++i;
|
||||
icons.push_back(StickerIcon(Stickers::RecentSetId));
|
||||
}
|
||||
for (int l = _mySets.size(); i < l; ++i) {
|
||||
if (i != _mySets.size() && _mySets[i].id == Stickers::FavedSetId) {
|
||||
++i;
|
||||
icons.push_back(StickerIcon(Stickers::FavedSetId));
|
||||
}
|
||||
for (auto l = _mySets.size(); i != l; ++i) {
|
||||
auto s = _mySets[i].pack[0];
|
||||
int32 availw = st::emojiCategory.width - 2 * st::stickerIconPadding, availh = st::emojiCategory.height - 2 * st::stickerIconPadding;
|
||||
int32 thumbw = s->thumb->width(), thumbh = s->thumb->height(), pixw = 1, pixh = 1;
|
||||
auto availw = st::emojiCategory.width - 2 * st::stickerIconPadding, availh = st::emojiCategory.height - 2 * st::stickerIconPadding;
|
||||
auto thumbw = s->thumb->width(), thumbh = s->thumb->height(), pixw = 1, pixh = 1;
|
||||
if (availw * thumbh > availh * thumbw) {
|
||||
pixh = availh;
|
||||
pixw = (pixh * thumbw) / thumbh;
|
||||
|
@ -1210,7 +1215,6 @@ void StickersListWidget::fillIcons(QList<StickerIcon> &icons) {
|
|||
if (pixh < 1) pixh = 1;
|
||||
icons.push_back(StickerIcon(_mySets[i].id, s, pixw, pixh));
|
||||
}
|
||||
}
|
||||
|
||||
if (!Global::FeaturedStickerSetsUnreadCount() && !_featuredSets.isEmpty()) {
|
||||
icons.push_back(StickerIcon(Stickers::FeaturedSetId));
|
||||
|
|