Update faved sticker / saved GIF remove button.
|
@ -255,7 +255,7 @@ emojiPanHeaderFg: windowSubTextFg; // emoji panel section header text
|
||||||
emojiPanHeaderBg: #fffffff2 | emojiPanBg; // emoji panel section header background
|
emojiPanHeaderBg: #fffffff2 | emojiPanBg; // emoji panel section header background
|
||||||
emojiIconFg: checkboxFg; // emoji category icon
|
emojiIconFg: checkboxFg; // emoji category icon
|
||||||
emojiIconFgActive: windowBgActive; // active emoji category icon
|
emojiIconFgActive: windowBgActive; // active emoji category icon
|
||||||
stickerPanDeleteBg: #000000cc; // delete X button background for custom sent stickers in stickers panel (legacy)
|
stickerPanDeleteBg: #000000ff; // delete X button background for custom sent stickers in stickers panel (legacy)
|
||||||
stickerPanDeleteFg: windowFgActive; // delete X button icon for custom sent stickers in stickers panel (legacy)
|
stickerPanDeleteFg: windowFgActive; // delete X button icon for custom sent stickers in stickers panel (legacy)
|
||||||
stickerPreviewBg: #ffffffb0; // sticker and GIF preview background (when you press and hold on a sticker)
|
stickerPreviewBg: #ffffffb0; // sticker and GIF preview background (when you press and hold on a sticker)
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 245 B |
|
@ -194,11 +194,12 @@ hashtagClose: IconButton {
|
||||||
|
|
||||||
stickerPanSize: size(64px, 64px);
|
stickerPanSize: size(64px, 64px);
|
||||||
stickerPanPadding: 11px;
|
stickerPanPadding: 11px;
|
||||||
stickerPanDelete: icon {
|
stickerPanDeleteIconBg: icon {{ "emoji_delete_bg", stickerPanDeleteBg }};
|
||||||
{ "emoji_delete_bg", stickerPanDeleteBg },
|
stickerPanDeleteIconFg: icon {{ "emoji_delete", stickerPanDeleteFg }};
|
||||||
{ "emoji_delete", stickerPanDeleteFg },
|
stickerPanDeleteOpacityBg: 0.3;
|
||||||
};
|
stickerPanDeleteOpacityBgOver: 0.5;
|
||||||
stickerPanDeleteOpacity: 0.5;
|
stickerPanDeleteOpacityFg: 0.8;
|
||||||
|
stickerPanDeleteOpacityFgOver: 1.;
|
||||||
stickerPanRemoveSet: hashtagClose;
|
stickerPanRemoveSet: hashtagClose;
|
||||||
stickerIconPadding: 5px;
|
stickerIconPadding: 5px;
|
||||||
stickerIconOpacity: 0.7;
|
stickerIconOpacity: 0.7;
|
||||||
|
|
|
@ -839,10 +839,12 @@ void StickersListWidget::paintSticker(Painter &p, Set &set, int y, int index, bo
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected && stickerHasDeleteButton(set, index)) {
|
if (selected && stickerHasDeleteButton(set, index)) {
|
||||||
auto xPos = pos + QPoint(st::stickerPanSize.width() - st::stickerPanDelete.width(), 0);
|
auto xPos = pos + QPoint(st::stickerPanSize.width() - st::stickerPanDeleteIconBg.width(), 0);
|
||||||
if (!deleteSelected) p.setOpacity(st::stickerPanDeleteOpacity);
|
p.setOpacity(deleteSelected ? st::stickerPanDeleteOpacityBgOver : st::stickerPanDeleteOpacityBg);
|
||||||
st::stickerPanDelete.paint(p, xPos, width());
|
st::stickerPanDeleteIconBg.paint(p, xPos, width());
|
||||||
if (!deleteSelected) p.setOpacity(1.);
|
p.setOpacity(deleteSelected ? st::stickerPanDeleteOpacityFgOver : st::stickerPanDeleteOpacityFg);
|
||||||
|
st::stickerPanDeleteIconFg.paint(p, xPos, width());
|
||||||
|
p.setOpacity(1.);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1466,7 +1468,7 @@ void StickersListWidget::updateSelected() {
|
||||||
if (stickerHasDeleteButton(set, index)) {
|
if (stickerHasDeleteButton(set, index)) {
|
||||||
auto inx = sx - (columnIndex * st::stickerPanSize.width());
|
auto inx = sx - (columnIndex * st::stickerPanSize.width());
|
||||||
auto iny = yOffset - (rowIndex * st::stickerPanSize.height());
|
auto iny = yOffset - (rowIndex * st::stickerPanSize.height());
|
||||||
if (inx >= st::stickerPanSize.width() - st::stickerPanDelete.width() && iny < st::stickerPanDelete.height()) {
|
if (inx >= st::stickerPanSize.width() - st::stickerPanDeleteIconBg.width() && iny < st::stickerPanDeleteIconBg.height()) {
|
||||||
overDelete = true;
|
overDelete = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,17 +201,19 @@ void Gif::paint(Painter &p, const QRect &clip, const PaintContext *context) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_delete && (_state & StateFlag::Over)) {
|
if (_delete && (_state & StateFlag::Over)) {
|
||||||
float64 deleteOver = _a_deleteOver.current(context->ms, (_state & StateFlag::DeleteOver) ? 1 : 0);
|
auto deleteSelected = (_state & StateFlag::DeleteOver);
|
||||||
QPoint deletePos = QPoint(_width - st::stickerPanDelete.width(), 0);
|
auto deletePos = QPoint(_width - st::stickerPanDeleteIconBg.width(), 0);
|
||||||
p.setOpacity(deleteOver + (1 - deleteOver) * st::stickerPanDeleteOpacity);
|
p.setOpacity(deleteSelected ? st::stickerPanDeleteOpacityBgOver : st::stickerPanDeleteOpacityBg);
|
||||||
st::stickerPanDelete.paint(p, deletePos, _width);
|
st::stickerPanDeleteIconBg.paint(p, deletePos, width());
|
||||||
p.setOpacity(1);
|
p.setOpacity(deleteSelected ? st::stickerPanDeleteOpacityFgOver : st::stickerPanDeleteOpacityFg);
|
||||||
|
st::stickerPanDeleteIconFg.paint(p, deletePos, width());
|
||||||
|
p.setOpacity(1.);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gif::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, QPoint point) const {
|
void Gif::getState(ClickHandlerPtr &link, HistoryCursorState &cursor, QPoint point) const {
|
||||||
if (QRect(0, 0, _width, st::inlineMediaHeight).contains(point)) {
|
if (QRect(0, 0, _width, st::inlineMediaHeight).contains(point)) {
|
||||||
if (_delete && rtlpoint(point, _width).x() >= _width - st::stickerPanDelete.width() && point.y() < st::stickerPanDelete.height()) {
|
if (_delete && rtlpoint(point, _width).x() >= _width - st::stickerPanDeleteIconBg.width() && point.y() < st::stickerPanDeleteIconBg.height()) {
|
||||||
link = _delete;
|
link = _delete;
|
||||||
} else {
|
} else {
|
||||||
link = _send;
|
link = _send;
|
||||||
|
|