2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

drag-n-drop files to dialogs list

This commit is contained in:
John Preston
2015-06-26 12:07:59 +03:00
parent ddac19788f
commit d81d6bbeaa
9 changed files with 73 additions and 29 deletions

View File

@@ -571,6 +571,11 @@ void MainWidget::onSendPaths(const PeerId &peer) {
history.onSendPaths(peer);
}
void MainWidget::onFilesDrop(const PeerId &peer, const QMimeData *data) {
showPeer(peer, 0, false, true);
history.onFilesDrop(data);
}
void MainWidget::noHider(HistoryHider *destroyed) {
if (hider == destroyed) {
hider = 0;
@@ -616,12 +621,13 @@ void MainWidget::hiderLayer(HistoryHider *h) {
hider = h;
connect(hider, SIGNAL(forwarded()), &dialogs, SLOT(onCancelSearch()));
dialogsToUp();
if (cWideMode()) {
hider->show();
resizeEvent(0);
dialogs.activate();
} else {
dialogsToUp();
hider->hide();
dialogs.enableShadow(false);
QPixmap animCache = myGrab(this, QRect(0, 0, _dialogsWidth, height()));