mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 06:07:06 +02:00
Fix emoji set right buttons.
This commit is contained in:
parent
f19e343025
commit
04482ef33b
3 changed files with 26 additions and 10 deletions
|
@ -72,7 +72,7 @@ stickersTrendingSubheaderFg: windowSubTextFg;
|
|||
stickersTrendingSubheaderTop: 31px;
|
||||
|
||||
emojiPanButtonRight: 7px;
|
||||
emojiPanButtonTop: 10px;
|
||||
emojiPanButtonTop: 0px;
|
||||
emojiPanButton: RoundButton(defaultActiveButton) {
|
||||
width: -24px;
|
||||
height: 23px;
|
||||
|
@ -280,6 +280,7 @@ inlineResultsMaxHeight: 640px;
|
|||
|
||||
emojiPanHeaderFont: semiboldFont;
|
||||
emojiPanRemoveSkip: 10px;
|
||||
emojiPanRemoveTop: 2px;
|
||||
|
||||
emojiColorsPadding: 5px;
|
||||
emojiColorsSep: 1px;
|
||||
|
@ -312,7 +313,12 @@ stickerPanDeleteOpacityBg: 0.3;
|
|||
stickerPanDeleteOpacityBgOver: 0.5;
|
||||
stickerPanDeleteOpacityFg: 0.8;
|
||||
stickerPanDeleteOpacityFgOver: 1.;
|
||||
stickerPanRemoveSet: hashtagClose;
|
||||
stickerPanRemoveSet: IconButton(hashtagClose) {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
iconPosition: point(-1px, -1px);
|
||||
rippleAreaPosition: point(0px, 0px);
|
||||
}
|
||||
stickerIconWidth: 42px;
|
||||
stickerIconPadding: 5px;
|
||||
stickerIconOpacity: 0.7;
|
||||
|
|
|
@ -1531,7 +1531,7 @@ QRect EmojiListWidget::removeButtonRect(const SectionInfo &info) const {
|
|||
+ st::stickerPanRemoveSet.rippleAreaSize;
|
||||
const auto buttonh = st::stickerPanRemoveSet.height;
|
||||
const auto buttonx = emojiRight() - st::emojiPanRemoveSkip - buttonw;
|
||||
const auto buttony = info.top + (st().header - buttonh) / 2;
|
||||
const auto buttony = info.top + st::emojiPanRemoveTop;
|
||||
return QRect(buttonx, buttony, buttonw, buttonh);
|
||||
}
|
||||
|
||||
|
@ -1971,12 +1971,16 @@ int EmojiListWidget::paintButtonGetWidth(
|
|||
custom.ripple.reset();
|
||||
}
|
||||
}
|
||||
(selected
|
||||
const auto &icon = selected
|
||||
? st::stickerPanRemoveSet.iconOver
|
||||
: st::stickerPanRemoveSet.icon).paint(
|
||||
p,
|
||||
remove.topLeft() + st::stickerPanRemoveSet.iconPosition,
|
||||
width());
|
||||
: st::stickerPanRemoveSet.icon;
|
||||
icon.paint(
|
||||
p,
|
||||
(remove.topLeft()
|
||||
+ QPoint(
|
||||
remove.width() - icon.width(),
|
||||
remove.height() - icon.height()) / 2),
|
||||
width());
|
||||
}
|
||||
return emojiRight() - remove.x();
|
||||
}
|
||||
|
|
|
@ -1303,8 +1303,14 @@ void StickersListFooter::paintSetIcon(
|
|||
p.translate(-center);
|
||||
}
|
||||
}
|
||||
prepareSetIcon(context, info, now, paused);
|
||||
p.drawImage(info.adjustedLeft, _iconsTop, _setIconCache);
|
||||
if (icon.sticker) {
|
||||
prepareSetIcon(context, info, now, paused);
|
||||
p.drawImage(info.adjustedLeft, _iconsTop, _setIconCache);
|
||||
} else {
|
||||
p.translate(info.adjustedLeft, _iconsTop);
|
||||
paintSetIconToCache(p, context, info, now, paused);
|
||||
p.translate(-info.adjustedLeft, -_iconsTop);
|
||||
}
|
||||
if (context.expanding) {
|
||||
if (icon.custom) {
|
||||
p.translate(-expandingShift);
|
||||
|
|
Loading…
Add table
Reference in a new issue