mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Fixed macOS-specific bug in AddNewTorrentDialog
Because AddNewTorrentDialog is a sheet in macOS, repositioning it causes bad things to happen, particularly if the main dialog is on a secondary monitor.
This commit is contained in:
parent
df1a8bfdea
commit
59e6a4298d
1 changed files with 5 additions and 0 deletions
|
@ -553,6 +553,10 @@ void AddNewTorrentDialog::renameSelectedFile()
|
||||||
|
|
||||||
void AddNewTorrentDialog::setdialogPosition()
|
void AddNewTorrentDialog::setdialogPosition()
|
||||||
{
|
{
|
||||||
|
// In macOS, AddNewTorrentDialog is a sheet, not a window. Moving it
|
||||||
|
// causes very bad things to happen, especially if AddNewTorrentDialog is
|
||||||
|
// on a secondary monitor.
|
||||||
|
#ifndef Q_OS_MAC
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
QPoint center(Utils::Misc::screenCenter(this));
|
QPoint center(Utils::Misc::screenCenter(this));
|
||||||
// Adjust y
|
// Adjust y
|
||||||
|
@ -566,6 +570,7 @@ void AddNewTorrentDialog::setdialogPosition()
|
||||||
center.setY(0);
|
center.setY(0);
|
||||||
}
|
}
|
||||||
move(center);
|
move(center);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddNewTorrentDialog::populateSavePathComboBox()
|
void AddNewTorrentDialog::populateSavePathComboBox()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue