From 341b2f345af50f5c28733121011fb58aa03d3f3e Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Thu, 13 Apr 2023 11:48:07 +0300 Subject: [PATCH] Use FlowLayout in AddTorrentParamsWidget --- src/gui/addtorrentparamswidget.cpp | 9 + src/gui/addtorrentparamswidget.ui | 366 +++++++++++++++-------------- 2 files changed, 196 insertions(+), 179 deletions(-) diff --git a/src/gui/addtorrentparamswidget.cpp b/src/gui/addtorrentparamswidget.cpp index ed77900b6..d85008b08 100644 --- a/src/gui/addtorrentparamswidget.cpp +++ b/src/gui/addtorrentparamswidget.cpp @@ -33,6 +33,7 @@ #include "base/bittorrent/session.h" #include "base/bittorrent/torrent.h" #include "base/utils/compare.h" +#include "flowlayout.h" #include "fspathedit.h" #include "torrenttagsdialog.h" #include "ui_addtorrentparamswidget.h" @@ -92,6 +93,14 @@ AddTorrentParamsWidget::AddTorrentParamsWidget(BitTorrent::AddTorrentParams addT dlg->open(); }); + auto *miscParamsLayout = new FlowLayout(m_ui->miscParamsWidget); + miscParamsLayout->setContentsMargins(0, 0, 0, 0); + miscParamsLayout->addWidget(m_ui->contentLayoutWidget); + miscParamsLayout->addWidget(m_ui->skipCheckingWidget); + miscParamsLayout->addWidget(m_ui->startTorrentWidget); + miscParamsLayout->addWidget(m_ui->stopConditionWidget); + miscParamsLayout->addWidget(m_ui->addToQueueTopWidget); + populate(); } diff --git a/src/gui/addtorrentparamswidget.ui b/src/gui/addtorrentparamswidget.ui index a3b7c188a..af16a9462 100644 --- a/src/gui/addtorrentparamswidget.ui +++ b/src/gui/addtorrentparamswidget.ui @@ -7,7 +7,7 @@ 0 0 503 - 338 + 366 @@ -169,190 +169,198 @@ - - - 0 + + + + 9 + 65 + 143 + 22 + - - 0 + + + 0 + + + 0 + + + 2 + + + 0 + + + + + Start torrent: + + + + + + + -1 + + + + + + + + + 9 + 37 + 164 + 22 + - - 0 + + + 0 + + + 0 + + + 2 + + + 0 + + + + + Skip hash check: + + + + + + + -1 + + + + + + + + + 9 + 9 + 159 + 22 + - - 0 + + + 0 + + + 0 + + + 2 + + + 0 + + + + + Content layout: + + + + + + + -1 + + + + + + + + + 9 + 93 + 158 + 22 + - - - - - - Content layout: - - - - - - - -1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Start torrent: - - - - - - - -1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Stop condition: - - - - - - - -1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Skip hash check: - - - - - - - -1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Add to top of queue: - - - - - - - -1 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - + + + 0 + + + 0 + + + 2 + + + 0 + + + + + Stop condition: + + + + + + + -1 + + + + + + + + + 9 + 121 + 187 + 22 + + + + + 0 + + + 0 + + + 2 + + + 0 + + + + + Add to top of queue: + + + + + + + -1 + + + + + - - - - Qt::Vertical - - - - 20 - 40 - - - -