aboutsummaryrefslogtreecommitdiff
path: root/src/qt/optionsdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/optionsdialog.cpp')
-rw-r--r--src/qt/optionsdialog.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index ee53a59bb5..b70769ed24 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -2,7 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <config/bitcoin-config.h> // IWYU pragma: keep
+#include <bitcoin-build-config.h> // IWYU pragma: keep
#include <qt/optionsdialog.h>
#include <qt/forms/ui_optionsdialog.h>
@@ -87,14 +87,15 @@ void setupFontOptions(QComboBox* cb, QLabel* preview)
}
OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
- : QDialog(parent, GUIUtil::dialog_flags),
+ : QDialog(parent, GUIUtil::dialog_flags | Qt::WindowMaximizeButtonHint),
ui(new Ui::OptionsDialog)
{
ui->setupUi(this);
+ ui->verticalLayout->setStretchFactor(ui->tabWidget, 1);
+
/* Main elements init */
- ui->databaseCache->setMinimum(nMinDbCache);
- ui->databaseCache->setMaximum(nMaxDbCache);
+ ui->databaseCache->setRange(nMinDbCache, std::numeric_limits<int>::max());
ui->threadsScriptVerif->setMinimum(-GetNumCores());
ui->threadsScriptVerif->setMaximum(MAX_SCRIPTCHECK_THREADS);
ui->pruneWarning->setVisible(false);
@@ -107,9 +108,6 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
#ifndef USE_UPNP
ui->mapPortUpnp->setEnabled(false);
#endif
-#ifndef USE_NATPMP
- ui->mapPortNatpmp->setEnabled(false);
-#endif
ui->proxyIp->setEnabled(false);
ui->proxyPort->setEnabled(false);
@@ -168,8 +166,15 @@ OptionsDialog::OptionsDialog(QWidget* parent, bool enableWallet)
/** check if the locale name consists of 2 parts (language_country) */
if(langStr.contains("_"))
{
- /** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */
- ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr));
+ /** display language strings as "native language - native country/territory (locale name)", e.g. "Deutsch - Deutschland (de)" */
+ ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") +
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 2, 0))
+ locale.nativeTerritoryName() +
+#else
+ locale.nativeCountryName() +
+#endif
+ QString(" (") + langStr + QString(")"), QVariant(langStr));
+
}
else
{
@@ -440,7 +445,7 @@ void OptionsDialog::updateProxyValidationState()
QValidatedLineEdit *otherProxyWidget = (pUiProxyIp == ui->proxyIpTor) ? ui->proxyIp : ui->proxyIpTor;
if (pUiProxyIp->isValid() && (!ui->proxyPort->isEnabled() || ui->proxyPort->text().toInt() > 0) && (!ui->proxyPortTor->isEnabled() || ui->proxyPortTor->text().toInt() > 0))
{
- setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxys are valid
+ setOkButtonState(otherProxyWidget->isValid()); //only enable ok button if both proxies are valid
clearStatusLabel();
}
else