From 99061d92c18e4b5f62215980ec455c06d7d98669 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 20 Jul 2022 14:41:00 +0800 Subject: [PATCH 1/3] Fix "Add torrent dialog" spill-over on smaller screens Done by adding an QScrollArea to the layout. Closes #17387. --- src/gui/addnewtorrentdialog.ui | 837 +++++++++++++++++---------------- 1 file changed, 441 insertions(+), 396 deletions(-) diff --git a/src/gui/addnewtorrentdialog.ui b/src/gui/addnewtorrentdialog.ui index 845dad783..8f1cfe56a 100644 --- a/src/gui/addnewtorrentdialog.ui +++ b/src/gui/addnewtorrentdialog.ui @@ -12,15 +12,26 @@ - - - Qt::Horizontal + + + QFrame::NoFrame - - false + + QAbstractScrollArea::AdjustToContents - - + + true + + + + + 0 + 0 + 868 + 644 + + + 0 @@ -34,417 +45,451 @@ 0 - - - - - Torrent Management Mode: - - - - - - - Automatic mode means that various torrent properties(eg save path) will be decided by the associated category - - - - Manual - - - - - Automatic - - - - - - - - Qt::Horizontal - - - - 20 - 20 - - - - - - - - - - Save at + + + Qt::Horizontal - - - - - - - - Use another path for incomplete torrent - - - true - - - false - - + + false + + + + + 0 + + + 0 + + + 0 + + + 0 + + + - + + + Torrent Management Mode: + + + + + + + Automatic mode means that various torrent properties(eg save path) will be decided by the associated category + + + + Manual + + + + + Automatic + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Remember last used save path - - - - - - - - - - - - Torrent settings - - - - - - - - Category: - - - - - - - - 0 - 0 - - - - true - - - QComboBox::InsertAtTop - - - - - - - - - Set as default category - - - - - - - - - When checked, the .torrent file will not be deleted regardless of the settings at the "Download" page of the Options dialog - - - Do not delete .torrent file - - - - - - - Download first and last pieces first - - - - - - - Skip hash check - - - - - - - Download in sequential order - - - - - - - Start torrent - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Content layout: - - - - - - - 0 - + + + + + Save at + + - - Original - + - - Create subfolder - + + + Use another path for incomplete torrent + + + true + + + false + + + + + + + - - Don't create subfolder - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Remember last used save path + + + + - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - 0 - 0 - - - - Torrent information - - - - - - Info hash v1: - - - - - - - - - - - - - QFrame::NoFrame - - - true - - - - - 0 - - - 0 - - - 0 - - - 0 - + + + + + + + Torrent settings + + - - - Qt::RichText + + + + + Category: + + + + + + + + 0 + 0 + + + + true + + + QComboBox::InsertAtTop + + + + + + + + + Set as default category + + + + + + + + + When checked, the .torrent file will not be deleted regardless of the settings at the "Download" page of the Options dialog + + + Do not delete .torrent file + + + + + + + Download first and last pieces first + + + + + + + Skip hash check + + + + + + + Download in sequential order + + + + + + + Start torrent + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Content layout: + + + + + + + 0 + + + + Original + + + + + Create subfolder + + + + + Don't create subfolder + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + 0 + 0 + + + + Torrent information + + + + + + Info hash v1: + + + + + + + + + + + + + QFrame::NoFrame + + + QAbstractScrollArea::AdjustToContents + + + true + + + + + 0 + 0 + 392 + 68 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + true + + + Qt::TextBrowserInteraction + + + + + + + + + + + Comment: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - true - - - true + + + + + + Size: + + + + - Qt::TextBrowserInteraction + Qt::TextSelectableByMouse + + + + + + + Date: + + + + + + + Info hash v2: + + + + + + + Qt::TextSelectableByMouse - - - - - - Comment: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Size: - - - - - - - Qt::TextSelectableByMouse - - - - - - - Date: - - - - - - - Info hash v2: - - - - - - - Qt::TextSelectableByMouse - - - - - - - - - - - - - - - - Select All - - - - - - - Select None - - - - - - - Qt::Horizontal - - - QSizePolicy::Maximum - - - - 165 - 20 - - - - - - - - - - - 1 - 0 - - - - Qt::CustomContextMenu - - - QAbstractItemView::ExtendedSelection - - - true - + + + + + + + + + + + Select All + + + + + + + Select None + + + + + + + Qt::Horizontal + + + + 165 + 20 + + + + + + + + + + + 1 + 0 + + + + Qt::CustomContextMenu + + + QAbstractItemView::ExtendedSelection + + + true + + + + + From c287c7bb01641060aacb1c3f9c8eddcf138ba250 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 21 Jul 2022 12:44:03 +0800 Subject: [PATCH 2/3] Revise action capitalization --- src/gui/properties/propertieswidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/properties/propertieswidget.cpp b/src/gui/properties/propertieswidget.cpp index 7235d8df8..0d2d2ad8b 100644 --- a/src/gui/properties/propertieswidget.cpp +++ b/src/gui/properties/propertieswidget.cpp @@ -646,7 +646,7 @@ void PropertiesWidget::displayFilesListMenu() menu->addAction(UIThemeManager::instance()->getIcon(u"folder-documents"_qs), tr("Open") , this, [this, index]() { openItem(index); }); - menu->addAction(UIThemeManager::instance()->getIcon(u"inode-directory"_qs), tr("Open Containing Folder") + menu->addAction(UIThemeManager::instance()->getIcon(u"inode-directory"_qs), tr("Open containing folder") , this, [this, index]() { openParentFolder(index); }); menu->addAction(UIThemeManager::instance()->getIcon(u"edit-rename"_qs), tr("Rename...") , this, [this]() { m_ui->filesList->renameSelectedFile(*m_torrent); }); From 3a6858a2773a8a7432b19ea453945e366cafd582 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 22 Jul 2022 13:22:34 +0800 Subject: [PATCH 3/3] Adjust height to hide scrollbar by default --- src/gui/addnewtorrentdialog.ui | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/addnewtorrentdialog.ui b/src/gui/addnewtorrentdialog.ui index 8f1cfe56a..5e484108c 100644 --- a/src/gui/addnewtorrentdialog.ui +++ b/src/gui/addnewtorrentdialog.ui @@ -7,7 +7,7 @@ 0 0 900 - 620 + 680 @@ -27,8 +27,8 @@ 0 0 - 868 - 644 + 882 + 598 @@ -346,8 +346,8 @@ 0 0 - 392 - 68 + 411 + 70 @@ -461,7 +461,7 @@ - 165 + 40 20