From 1e029da5ade40ca8f62ce793aa0b187bb4e54d42 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 22 May 2019 22:22:12 +0800 Subject: [PATCH 1/3] Fix search icon placement when using RTL languages --- src/gui/lineedit/src/lineedit.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/lineedit/src/lineedit.cpp b/src/gui/lineedit/src/lineedit.cpp index 5798bfcb9..a02048698 100644 --- a/src/gui/lineedit/src/lineedit.cpp +++ b/src/gui/lineedit/src/lineedit.cpp @@ -11,6 +11,7 @@ #include +#include #include #include #include @@ -38,7 +39,10 @@ LineEdit::LineEdit(QWidget *parent) void LineEdit::resizeEvent(QResizeEvent *e) { const int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); - m_searchButton->move(frameWidth, (e->size().height() - m_searchButton->sizeHint().height()) / 2); + const int xPos = QGuiApplication::isLeftToRight() + ? frameWidth + : (e->size().width() - m_searchButton->sizeHint().width() - frameWidth); + m_searchButton->move(xPos, (e->size().height() - m_searchButton->sizeHint().height()) / 2); } void LineEdit::keyPressEvent(QKeyEvent *event) From d7afc919750c6fb5bb8ad8588ba1f6a18f3a7cbe Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 23 May 2019 21:07:44 +0800 Subject: [PATCH 2/3] Avoid combo boxes extending to the right in Options dialog --- src/gui/optionsdialog.ui | 50 ++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index 3e67274ec..b8c16b937 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -257,19 +257,10 @@ - - - 50 - false - - Action on double-click - - true - - + @@ -279,12 +270,6 @@ - - - 0 - 0 - - 0 @@ -331,6 +316,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -414,15 +412,15 @@ - - + + Tray icon style: - + @@ -441,6 +439,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -3337,7 +3348,6 @@ Use ';' to split multiple entries. Can use wildcard '*'. checkShowSystray checkMinimizeToSysTray checkCloseToSystray - comboTrayIcon checkAssociateTorrents checkAssociateMagnetLinks checkPreventFromSuspendWhenDownloading From ccbb4576b6268aa1177c9c35dae4d72a4992a0ef Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Thu, 23 May 2019 21:27:50 +0800 Subject: [PATCH 3/3] Tweak visuals in Options dialog --- src/gui/optionsdialog.ui | 330 +++++++++++++-------------------------- 1 file changed, 108 insertions(+), 222 deletions(-) diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index b8c16b937..56a294436 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -1289,12 +1289,6 @@ - - - 0 - 0 - - Enabled protocol: @@ -1319,6 +1313,19 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -2346,19 +2353,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -2372,19 +2366,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -2397,19 +2378,6 @@ false - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -2463,19 +2431,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -2511,76 +2466,7 @@ Share Ratio Limiting - - - - Seed torrents until their ratio reaches - - - - - - - Qt::Horizontal - - - - 109 - 20 - - - - - - - - then - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Qt::Horizontal - - - - 121 - 28 - - - - - - - - Qt::Horizontal - - - - 100 - 42 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + false @@ -2599,36 +2485,24 @@ - - - - false - - - Qt::AlignHCenter - - - 0.000000000000000 - - - 9998.000000000000000 - - - 0.050000000000000 - - - 1.000000000000000 - - - - + Seed torrents until their seeding time reaches - + + + + then + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + false @@ -2645,17 +2519,50 @@ + + + + Seed torrents until their ratio reaches + + + + + + + false + + + Qt::AlignHCenter + + + 9998.000000000000000 + + + 0.050000000000000 + + + 1.000000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + - - - 0 - 0 - - A&utomatically add these trackers to new downloads: @@ -2747,8 +2654,15 @@ Feeds refresh interval: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 9999 + + + 100 @@ -2757,9 +2671,6 @@ Maximum number of articles per feed: - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - @@ -2778,17 +2689,7 @@ - - - - 9999 - - - 100 - - - - + Qt::Horizontal @@ -3022,44 +2923,7 @@ Specify an IPv4 or IPv6 address. You can specify "0.0.0.0" for any IPv Authentication - - - - - - - 1000 - - - QLineEdit::Normal - - - - - - - QLineEdit::Password - - - Change current password - - - - - - - Bypass authentication for clients on localhost - - - - - - - Bypass authentication for clients in whitelisted IP subnets - - - - + @@ -3072,20 +2936,47 @@ Specify an IPv4 or IPv6 address. You can specify "0.0.0.0" for any IPv - + + + + QLineEdit::Password + + + Change current password + + + + + + + Bypass authentication for clients on localhost + + + + + + + Bypass authentication for clients in whitelisted IP subnets + + + + Username: - + Password: + + + @@ -3100,15 +2991,15 @@ Specify an IPv4 or IPv6 address. You can specify "0.0.0.0" for any IPv false - - + + Files location: - + @@ -3419,11 +3310,6 @@ Use ';' to split multiple entries. Can use wildcard '*'. spinMaxActiveDownloads spinMaxActiveUploads spinMaxActiveTorrents - checkMaxRatio - spinMaxRatio - checkMaxSeedingMinutes - spinMaxSeedingMinutes - comboRatioLimitAct checkWebUIUPnP checkWebUiHttps checkBypassLocalAuth