diff --git a/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp b/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp index cd29f718d..e07fc1783 100644 --- a/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp +++ b/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp @@ -66,7 +66,7 @@ void SettingsDialog::initConnections() connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &SettingsDialog::accept); connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &SettingsDialog::reject); - connect(ui->cbEnableTls, &QCheckBox::toggled, this, &SettingsDialog::updateTlsControlsEnabled); + connect(ui->groupSecurity, &QGroupBox::toggled, this, &SettingsDialog::updateTlsControlsEnabled); connect(ui->cbServiceEnabled, &QCheckBox::toggled, this, &SettingsDialog::updateControls); connect(ui->btnTlsRegenCert, &QPushButton::clicked, this, &SettingsDialog::regenCertificates); connect(ui->btnTlsCertPath, &QPushButton::clicked, this, &SettingsDialog::browseCertificatePath); @@ -156,7 +156,7 @@ void SettingsDialog::accept() m_appConfig.setPreventSleep(ui->cbPreventSleep->isChecked()); m_appConfig.setTlsCertPath(ui->lineTlsCertPath->text()); m_appConfig.setTlsKeyLength(ui->comboTlsKeyLength->currentText().toInt()); - m_appConfig.setTlsEnabled(ui->cbEnableTls->isChecked()); + m_appConfig.setTlsEnabled(ui->groupSecurity->isChecked()); m_appConfig.setLanguageSync(ui->cbLanguageSync->isChecked()); m_appConfig.setInvertScrollDirection(ui->cbScrollDirection->isChecked()); m_appConfig.setEnableService(ui->cbServiceEnabled->isChecked()); @@ -230,9 +230,9 @@ void SettingsDialog::updateTlsControls() ui->lineTlsCertPath->setText(m_appConfig.tlsCertPath()); ui->cbRequireClientCert->setChecked(m_appConfig.requireClientCerts()); - ui->cbEnableTls->setChecked(tlsEnabled); + ui->groupSecurity->setChecked(tlsEnabled); - ui->cbEnableTls->setEnabled(writable); + ui->groupSecurity->setEnabled(writable); ui->comboTlsKeyLength->setEnabled(enabled); ui->widgetTlsCert->setEnabled(enabled); ui->lblTlsKeyLength->setEnabled(enabled); @@ -244,7 +244,7 @@ void SettingsDialog::updateTlsControlsEnabled() { const auto writable = m_appConfig.isActiveScopeWritable(); const auto clientMode = m_appConfig.clientGroupChecked(); - const auto tlsChecked = ui->cbEnableTls->isChecked(); + const auto tlsChecked = ui->groupSecurity->isChecked(); auto enabled = writable && tlsChecked && !clientMode; ui->lblTlsKeyLength->setEnabled(enabled); diff --git a/src/apps/deskflow-gui/dialogs/SettingsDialog.ui b/src/apps/deskflow-gui/dialogs/SettingsDialog.ui index f4b43beec..edf6777d6 100644 --- a/src/apps/deskflow-gui/dialogs/SettingsDialog.ui +++ b/src/apps/deskflow-gui/dialogs/SettingsDialog.ui @@ -7,7 +7,7 @@ 0 0 550 - 684 + 612 @@ -145,11 +145,14 @@ - Security + Enable TLS Encryption + + + true - 5 + 6 9 @@ -157,77 +160,21 @@ 9 - - - - 0 - - - - - true - - - Enable TLS encryption - - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Key length - - - - - - - 1024 - - - - 1024 - - - - - 2048 - - - - - 4096 - - - - - - + + 0 + 1 + + 0 + + + 0 + @@ -251,7 +198,7 @@ - 30 + 20 20 @@ -287,12 +234,47 @@ - + 0 - + + + + 0 + 0 + + + + Key length + + + + + + + 1024 + + + + 1024 + + + + + 2048 + + + + + 4096 + + + + + + Qt::Orientation::Horizontal @@ -745,20 +727,31 @@ - sbPort - lineInterface - cbEnableTls - comboTlsKeyLength + cbPreventSleep + cbLanguageSync + cbScrollDirection + cbAutoUpdate + cbCloseToTray + cbAutoHide + rbIconColorful + rbIconMono + groupSecurity lineTlsCertPath btnTlsCertPath + comboTlsKeyLength btnTlsRegenCert + cbRequireClientCert + tabWidget + sbPort + lineInterface cbLogToFile comboLogLevel lineLogFilename btnBrowseLog + cbServiceEnabled + comboElevate rbScopeUser rbScopeSystem - comboElevate