From 9fabb12b46b2c06c7f280d0b4d99f2fee2ded4f0 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 28 Aug 2024 14:39:20 +0200 Subject: [PATCH] remove some frames in group of settings to simplify layouts Signed-off-by: Matthieu Gallien --- src/gui/generalsettings.ui | 29 +- src/gui/networksettings.cpp | 4 +- src/gui/networksettings.ui | 543 ++++++++++++++++++------------------ 3 files changed, 299 insertions(+), 277 deletions(-) diff --git a/src/gui/generalsettings.ui b/src/gui/generalsettings.ui index d81e83cfbf50b..29ab115027747 100644 --- a/src/gui/generalsettings.ui +++ b/src/gui/generalsettings.ui @@ -19,6 +19,9 @@ Advanced + + true + @@ -40,10 +43,10 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - QSizePolicy::Fixed + QSizePolicy::Policy::Fixed @@ -77,10 +80,10 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - QSizePolicy::Fixed + QSizePolicy::Policy::Fixed @@ -104,10 +107,10 @@ - Qt::Horizontal + Qt::Orientation::Horizontal - QSizePolicy::Fixed + QSizePolicy::Policy::Fixed @@ -197,7 +200,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -217,6 +220,9 @@ Info + + true + @@ -321,7 +327,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -355,7 +361,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -373,7 +379,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -388,6 +394,9 @@ General Settings + + true + diff --git a/src/gui/networksettings.cpp b/src/gui/networksettings.cpp index c0f60b7bb1f37..24bbd4151ae77 100644 --- a/src/gui/networksettings.cpp +++ b/src/gui/networksettings.cpp @@ -38,7 +38,7 @@ NetworkSettings::NetworkSettings(const AccountPtr &account, QWidget *parent) _ui->manualSettings->setVisible(_ui->manualProxyRadioButton->isChecked()); - _ui->proxyGroupBox->setVisible(!Theme::instance()->doNotUseProxy()); + _ui->proxyFrame->setVisible(!Theme::instance()->doNotUseProxy()); if (!account) { _ui->globalProxySettingsRadioButton->setVisible(false); @@ -120,7 +120,7 @@ void NetworkSettings::loadProxySettings() { if (Theme::instance()->forceSystemNetworkProxy()) { _ui->systemProxyRadioButton->setChecked(true); - _ui->proxyGroupBox->setEnabled(false); + _ui->proxyFrame->setEnabled(false); return; } diff --git a/src/gui/networksettings.ui b/src/gui/networksettings.ui index db6db42be4802..6e584b1800ac2 100644 --- a/src/gui/networksettings.ui +++ b/src/gui/networksettings.ui @@ -17,7 +17,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -27,8 +27,243 @@ + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + QFrame::Shape::StyledPanel + + + + 9 + + + 0 + + + 6 + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Limit to 3/4 of estimated bandwidth + + + Limit automatically + + + + + + + Use global settings + + + + + + + + + true + + + 999999 + + + 80 + + + + + + + + 0 + 0 + + + + KBytes/s + + + + + + + + + No limit + + + true + + + + + + + Limit to + + + + + + + Download Bandwidth: + + + + + + + + + + + 0 + 0 + + + + QFrame::Shape::StyledPanel + + + + 9 + + + 0 + + + 6 + + + + + Limit to + + + + + + + + + true + + + 1 + + + 999999 + + + 10 + + + + + + + + 0 + 0 + + + + KBytes/s + + + + + + + + + Qt::Orientation::Vertical + + + + 20 + 40 + + + + + + + + Limit to 3/4 of estimated bandwidth + + + Limit automatically + + + + + + + Use global settings + + + + + + + No limit + + + true + + + + + + + Upload Bandwidth: + + + + + autoUploadLimitRadioButton + uploadLimitRadioButton + noUploadLimitRadioButton + verticalSpacer_3 + globalUploadSettingsRadioButton + label_4 + + + + - + true @@ -38,21 +273,24 @@ 0 - - Proxy Settings + + QFrame::Shape::StyledPanel - - - - Use system proxy + + + + Qt::Orientation::Horizontal - - proxyButtonGroup - - + + + 40 + 20 + + + - + @@ -87,7 +325,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -208,7 +446,7 @@ - QLineEdit::Password + QLineEdit::EchoMode::Password @@ -228,7 +466,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -240,7 +478,17 @@ - + + + + Use global settings + + + proxyButtonGroup + + + + Manually specify proxy @@ -250,7 +498,17 @@ - + + + + Use system proxy + + + proxyButtonGroup + + + + No proxy @@ -263,261 +521,16 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - Use global settings + Proxy Settings: - - proxyButtonGroup - - - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Download Bandwidth - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - 9 - - - 0 - - - 6 - - - - - No limit - - - true - - - - - - - - - true - - - 999999 - - - 80 - - - - - - - - 0 - 0 - - - - KBytes/s - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Limit to - - - - - - - Limit to 3/4 of estimated bandwidth - - - Limit automatically - - - - - - - Use global settings - - - - - - - - - - - 0 - 0 - - - - Upload Bandwidth - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - false - - - - 9 - - - 0 - - - 6 - - - - - Limit to 3/4 of estimated bandwidth - - - Limit automatically - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Limit to - - - - - - - No limit - - - true - - - - - - - - - true - - - 1 - - - 999999 - - - 10 - - - - - - - - 0 - 0 - - - - KBytes/s - - - - - - - - - Use global settings - - - - - autoUploadLimitRadioButton - uploadLimitRadioButton - noUploadLimitRadioButton - verticalSpacer_3 - globalUploadSettingsRadioButton - - - -