mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
fixed gif animations for wide gifs
This commit is contained in:
@@ -463,16 +463,18 @@ void HistoryList::dragActionCancel() {
|
||||
}
|
||||
|
||||
void HistoryList::itemRemoved(HistoryItem *item) {
|
||||
if (_dragItem == item) {
|
||||
dragActionCancel();
|
||||
}
|
||||
|
||||
SelectedItems::iterator i = _selected.find(item);
|
||||
if (i != _selected.cend()) {
|
||||
_selected.erase(i);
|
||||
historyWidget->updateTopBarSelection();
|
||||
}
|
||||
|
||||
if (_dragAction == NoDrag) return;
|
||||
|
||||
if (_dragItem == item) {
|
||||
dragActionCancel();
|
||||
}
|
||||
|
||||
onUpdateSelected();
|
||||
|
||||
if (_dragSelFrom == item) _dragSelFrom = 0;
|
||||
@@ -836,24 +838,6 @@ void HistoryList::copyContextText() {
|
||||
}
|
||||
}
|
||||
|
||||
bool HistoryList::getPhotoCoords(PhotoData *photo, int32 &x, int32 &y, int32 &w) const {
|
||||
HistoryItem *hoveredItem = App::hoveredLinkItem();
|
||||
if (hoveredItem && hoveredItem->getPhotoCoords(photo, x, y, w)) {
|
||||
y += height() - hist->height - st::historyPadding + hoveredItem->block()->y + hoveredItem->y;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HistoryList::getVideoCoords(VideoData *video, int32 &x, int32 &y, int32 &w) const {
|
||||
HistoryItem *hoveredItem = App::hoveredItem();
|
||||
if (hoveredItem && hoveredItem->getVideoCoords(video, x, y, w)) {
|
||||
y += height() - hist->height - st::historyPadding + hoveredItem->block()->y + hoveredItem->y;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void HistoryList::resizeEvent(QResizeEvent *e) {
|
||||
onUpdateSelected();
|
||||
}
|
||||
@@ -3323,24 +3307,6 @@ void HistoryWidget::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
}
|
||||
|
||||
bool HistoryWidget::getPhotoCoords(PhotoData *photo, int32 &x, int32 &y, int32 &w) const {
|
||||
if (_list && _list->getPhotoCoords(photo, x, y, w)) {
|
||||
x += _list->x();
|
||||
y += _list->y();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HistoryWidget::getVideoCoords(VideoData *video, int32 &x, int32 &y, int32 &w) const {
|
||||
if (_list && _list->getVideoCoords(video, x, y, w)) {
|
||||
x += _list->x();
|
||||
y += _list->y();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QRect HistoryWidget::historyRect() const {
|
||||
return _scroll.geometry();
|
||||
}
|
||||
|
Reference in New Issue
Block a user