mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 04:49:47 -07:00
- Adapt torrent addition dialog size when the torrent is a magnet link (since we don't display torrent content)
This commit is contained in:
parent
4c8a087b81
commit
ff65b6ea2f
1 changed files with 10 additions and 2 deletions
|
@ -95,7 +95,7 @@ public:
|
||||||
addInPause->setEnabled(false);
|
addInPause->setEnabled(false);
|
||||||
}
|
}
|
||||||
#ifndef LIBTORRENT_0_15
|
#ifndef LIBTORRENT_0_15
|
||||||
addInSeed->setEnabled(false);
|
addInSeed->setVisible(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +138,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveSettings() {
|
void saveSettings() {
|
||||||
|
if(is_magnet) return;
|
||||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||||
QVariantList contentColsWidths;
|
QVariantList contentColsWidths;
|
||||||
// -1 because we hid PROGRESS column
|
// -1 because we hid PROGRESS column
|
||||||
|
@ -150,11 +151,16 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void showLoadMagnetURI(QString magnet_uri) {
|
void showLoadMagnetURI(QString magnet_uri) {
|
||||||
|
show();
|
||||||
is_magnet = true;
|
is_magnet = true;
|
||||||
this->from_url = magnet_uri;
|
this->from_url = magnet_uri;
|
||||||
|
int hidden_height = 0;
|
||||||
// Disable useless widgets
|
// Disable useless widgets
|
||||||
|
hidden_height += torrentContentList->height();
|
||||||
torrentContentList->setVisible(false);
|
torrentContentList->setVisible(false);
|
||||||
|
hidden_height += torrentContentLbl->height();
|
||||||
torrentContentLbl->setVisible(false);
|
torrentContentLbl->setVisible(false);
|
||||||
|
hidden_height += collapseAllButton->height();
|
||||||
collapseAllButton->setVisible(false);
|
collapseAllButton->setVisible(false);
|
||||||
expandAllButton->setVisible(false);
|
expandAllButton->setVisible(false);
|
||||||
// Get torrent hash
|
// Get torrent hash
|
||||||
|
@ -177,7 +183,9 @@ public:
|
||||||
comboLabel->addItem(label);
|
comboLabel->addItem(label);
|
||||||
}
|
}
|
||||||
// Show dialog
|
// Show dialog
|
||||||
show();
|
//show();
|
||||||
|
setMinimumSize(0, 0);
|
||||||
|
resize(width(), height()-hidden_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void showLoad(QString filePath, QString from_url=QString::null){
|
void showLoad(QString filePath, QString from_url=QString::null){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue