Browse Source

Merge pull request #17407 from Chocobo1/addtorrent

Fix "Add torrent dialog" spill-over on smaller screens
adaptive-webui-19844
Chocobo1 2 years ago committed by GitHub
parent
commit
3567ae3529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 831
      src/gui/addnewtorrentdialog.ui
  2. 2
      src/gui/properties/propertieswidget.cpp

831
src/gui/addnewtorrentdialog.ui

@ -7,20 +7,31 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>900</width> <width>900</width>
<height>620</height> <height>680</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="AddNewTorrentDialogLayout"> <layout class="QVBoxLayout" name="AddNewTorrentDialogLayout">
<item> <item>
<widget class="QSplitter" name="splitter"> <widget class="QScrollArea" name="scrollArea_2">
<property name="orientation"> <property name="frameShape">
<enum>Qt::Horizontal</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="childrenCollapsible"> <property name="sizeAdjustPolicy">
<bool>false</bool> <enum>QAbstractScrollArea::AdjustToContents</enum>
</property> </property>
<widget class="QFrame" name="torrentoptionsFrame"> <property name="widgetResizable">
<layout class="QVBoxLayout" name="mainlayout_addui"> <bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_2">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>882</width>
<height>598</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -34,417 +45,451 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" name="managementLayout"> <widget class="QSplitter" name="splitter">
<item> <property name="orientation">
<widget class="QLabel" name="labelTorrentManagementMode"> <enum>Qt::Horizontal</enum>
<property name="text"> </property>
<string>Torrent Management Mode:</string> <property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QFrame" name="torrentoptionsFrame">
<layout class="QVBoxLayout" name="mainlayout_addui">
<property name="leftMargin">
<number>0</number>
</property> </property>
</widget> <property name="topMargin">
</item> <number>0</number>
<item>
<widget class="QComboBox" name="comboTTM">
<property name="toolTip">
<string>Automatic mode means that various torrent properties(eg save path) will be decided by the associated category</string>
</property> </property>
<item> <property name="rightMargin">
<property name="text"> <number>0</number>
<string>Manual</string>
</property>
</item>
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="bottomMargin">
<size> <number>0</number>
<width>20</width>
<height>20</height>
</size>
</property> </property>
</spacer> <item>
</item> <layout class="QHBoxLayout" name="managementLayout">
</layout>
</item>
<item>
<widget class="QGroupBox" name="groupBoxSavePath">
<property name="title">
<string>Save at</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="FileSystemPathComboEdit" name="savePath" native="true"/>
</item>
<item>
<widget class="QGroupBox" name="groupBoxDownloadPath">
<property name="title">
<string>Use another path for incomplete torrent</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item> <item>
<widget class="FileSystemPathComboEdit" name="downloadPath" native="true"/> <widget class="QLabel" name="labelTorrentManagementMode">
<property name="text">
<string>Torrent Management Mode:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboTTM">
<property name="toolTip">
<string>Automatic mode means that various torrent properties(eg save path) will be decided by the associated category</string>
</property>
<item>
<property name="text">
<string>Manual</string>
</property>
</item>
<item>
<property name="text">
<string>Automatic</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item> </item>
</layout> </layout>
</widget> </item>
</item> <item>
<item> <widget class="QGroupBox" name="groupBoxSavePath">
<layout class="QHBoxLayout" name="layoutRememberLastSavePath"> <property name="title">
<item> <string>Save at</string>
<spacer name="horizontalSpacer_5"> </property>
<property name="orientation"> <layout class="QVBoxLayout" name="verticalLayout">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBoxRememberLastSavePath">
<property name="text">
<string>Remember last used save path</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxSettings">
<property name="title">
<string>Torrent settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="categoryLayout">
<item>
<widget class="QLabel" name="labelCategory">
<property name="text">
<string>Category:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="categoryComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</item>
<item alignment="Qt::AlignRight">
<widget class="QCheckBox" name="defaultCategoryCheckbox">
<property name="text">
<string>Set as default category</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QCheckBox" name="doNotDeleteTorrentCheckBox">
<property name="toolTip">
<string>When checked, the .torrent file will not be deleted regardless of the settings at the &quot;Download&quot; page of the Options dialog</string>
</property>
<property name="text">
<string>Do not delete .torrent file</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="firstLastCheckBox">
<property name="text">
<string>Download first and last pieces first</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="skipCheckingCheckBox">
<property name="text">
<string>Skip hash check</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="sequentialCheckBox">
<property name="text">
<string>Download in sequential order</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="startTorrentCheckBox">
<property name="text">
<string>Start torrent</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="contentLayoutLabel">
<property name="text">
<string>Content layout:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="contentLayoutComboBox">
<property name="currentIndex">
<number>0</number>
</property>
<item> <item>
<property name="text"> <widget class="FileSystemPathComboEdit" name="savePath" native="true"/>
<string>Original</string>
</property>
</item> </item>
<item> <item>
<property name="text"> <widget class="QGroupBox" name="groupBoxDownloadPath">
<string>Create subfolder</string> <property name="title">
</property> <string>Use another path for incomplete torrent</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="FileSystemPathComboEdit" name="downloadPath" native="true"/>
</item>
</layout>
</widget>
</item> </item>
<item> <item>
<property name="text"> <layout class="QHBoxLayout" name="layoutRememberLastSavePath">
<string>Don't create subfolder</string> <item>
</property> <spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBoxRememberLastSavePath">
<property name="text">
<string>Remember last used save path</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBoxSettings">
<property name="title">
<string>Torrent settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="categoryLayout">
<item>
<widget class="QLabel" name="labelCategory">
<property name="text">
<string>Category:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="categoryComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</item>
<item alignment="Qt::AlignRight">
<widget class="QCheckBox" name="defaultCategoryCheckbox">
<property name="text">
<string>Set as default category</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QCheckBox" name="doNotDeleteTorrentCheckBox">
<property name="toolTip">
<string>When checked, the .torrent file will not be deleted regardless of the settings at the &quot;Download&quot; page of the Options dialog</string>
</property>
<property name="text">
<string>Do not delete .torrent file</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="firstLastCheckBox">
<property name="text">
<string>Download first and last pieces first</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="skipCheckingCheckBox">
<property name="text">
<string>Skip hash check</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="sequentialCheckBox">
<property name="text">
<string>Download in sequential order</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="startTorrentCheckBox">
<property name="text">
<string>Start torrent</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item> </item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="infoGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Torrent information</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="labelInfohash1">
<property name="text">
<string>Info hash v1:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelSizeData"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelDateData"/>
</item>
<item row="4" column="1">
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QLabel" name="labelCommentData"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="textFormat"> <item>
<enum>Qt::RichText</enum> <widget class="QLabel" name="contentLayoutLabel">
<property name="text">
<string>Content layout:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="contentLayoutComboBox">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Original</string>
</property>
</item>
<item>
<property name="text">
<string>Create subfolder</string>
</property>
</item>
<item>
<property name="text">
<string>Don't create subfolder</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="infoGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Torrent information</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
<widget class="QLabel" name="labelInfohash1">
<property name="text">
<string>Info hash v1:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelSizeData"/>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelDateData"/>
</item>
<item row="4" column="1">
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContents</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>411</width>
<height>70</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="labelCommentData">
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelComment">
<property name="text">
<string>Comment:</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
<property name="wordWrap"> </widget>
<bool>true</bool> </item>
<item row="0" column="0">
<widget class="QLabel" name="labelSize">
<property name="text">
<string>Size:</string>
</property> </property>
<property name="openExternalLinks"> </widget>
<bool>true</bool> </item>
<item row="2" column="1">
<widget class="QLabel" name="labelInfohash1Data">
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelDate">
<property name="text">
<string>Date:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelInfohash2">
<property name="text">
<string>Info hash v2:</string>
</property> </property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelInfohash2Data">
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set> <set>Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget> </item>
</item> </layout>
<item row="4" column="0"> </widget>
<widget class="QLabel" name="labelComment"> <widget class="QWidget" name="layoutWidget">
<property name="text"> <layout class="QVBoxLayout" name="verticalLayout_5">
<string>Comment:</string> <item>
</property> <layout class="QHBoxLayout" name="contentFilterLayout">
<property name="alignment"> <item>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <widget class="QPushButton" name="buttonSelectAll">
</property> <property name="text">
</widget> <string>Select All</string>
</item> </property>
<item row="0" column="0"> </widget>
<widget class="QLabel" name="labelSize"> </item>
<property name="text"> <item>
<string>Size:</string> <widget class="QPushButton" name="buttonSelectNone">
</property> <property name="text">
</widget> <string>Select None</string>
</item> </property>
<item row="2" column="1"> </widget>
<widget class="QLabel" name="labelInfohash1Data"> </item>
<property name="textInteractionFlags"> <item>
<set>Qt::TextSelectableByMouse</set> <spacer name="horizontalSpacer_6">
</property> <property name="orientation">
</widget> <enum>Qt::Horizontal</enum>
</item> </property>
<item row="1" column="0"> <property name="sizeHint" stdset="0">
<widget class="QLabel" name="labelDate"> <size>
<property name="text"> <width>40</width>
<string>Date:</string> <height>20</height>
</property> </size>
</widget> </property>
</item> </spacer>
<item row="3" column="0"> </item>
<widget class="QLabel" name="labelInfohash2"> </layout>
<property name="text"> </item>
<string>Info hash v2:</string> <item>
</property> <widget class="TorrentContentTreeView" name="contentTreeView">
</widget> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<item row="3" column="1"> <horstretch>1</horstretch>
<widget class="QLabel" name="labelInfohash2Data"> <verstretch>0</verstretch>
<property name="textInteractionFlags"> </sizepolicy>
<set>Qt::TextSelectableByMouse</set> </property>
</property> <property name="contextMenuPolicy">
</widget> <enum>Qt::CustomContextMenu</enum>
</item> </property>
</layout> <property name="selectionMode">
</widget> <enum>QAbstractItemView::ExtendedSelection</enum>
</item> </property>
</layout> <property name="sortingEnabled">
</widget> <bool>true</bool>
<widget class="QWidget" name="layoutWidget"> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> </widget>
<item> </item>
<layout class="QHBoxLayout" name="contentFilterLayout"> </layout>
<item> </widget>
<widget class="QPushButton" name="buttonSelectAll">
<property name="text">
<string>Select All</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonSelectNone">
<property name="text">
<string>Select None</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>165</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="TorrentContentTreeView" name="contentTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

2
src/gui/properties/propertieswidget.cpp

@ -646,7 +646,7 @@ void PropertiesWidget::displayFilesListMenu()
menu->addAction(UIThemeManager::instance()->getIcon(u"folder-documents"_qs), tr("Open") menu->addAction(UIThemeManager::instance()->getIcon(u"folder-documents"_qs), tr("Open")
, this, [this, index]() { openItem(index); }); , 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); }); , this, [this, index]() { openParentFolder(index); });
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-rename"_qs), tr("Rename...") menu->addAction(UIThemeManager::instance()->getIcon(u"edit-rename"_qs), tr("Rename...")
, this, [this]() { m_ui->filesList->renameSelectedFile(*m_torrent); }); , this, [this]() { m_ui->filesList->renameSelectedFile(*m_torrent); });

Loading…
Cancel
Save