From c92e511d7caeea91db3c349e13312b7b597cce0e Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Mon, 24 Oct 2022 09:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=B1=E6=B5=85=E4=B8=BB=E9=A2=98=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=BC=BA=E8=B0=83=E8=89=B2=20=E8=AE=BE=E7=BD=AESDK?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E6=A1=86=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enterprise-wlan/enterprisewlandialog.cpp | 10 ++++++++++ src/frontend/netdetails/joinhiddenwifipage.cpp | 12 ++++++++++++ src/frontend/netdetails/securitypage.cpp | 3 +++ 3 files changed, 25 insertions(+) diff --git a/src/frontend/enterprise-wlan/enterprisewlandialog.cpp b/src/frontend/enterprise-wlan/enterprisewlandialog.cpp index bdab0ebe..7b772076 100644 --- a/src/frontend/enterprise-wlan/enterprisewlandialog.cpp +++ b/src/frontend/enterprise-wlan/enterprisewlandialog.cpp @@ -183,6 +183,16 @@ void EnterpriseWlanDialog::initConnections() }); connect(qApp, &QApplication::paletteChanged, this, &EnterpriseWlanDialog::onPaletteChanged); + + const QByteArray id(THEME_SCHAME); + if(QGSettings::isSchemaInstalled(id)){ + QGSettings * fontSetting = new QGSettings(id, QByteArray(), this); + connect(fontSetting, &QGSettings::changed,[=](QString key) { + if ("themeColor" == key) { + onPaletteChanged(); + } + }); + } } void EnterpriseWlanDialog::onPaletteChanged() diff --git a/src/frontend/netdetails/joinhiddenwifipage.cpp b/src/frontend/netdetails/joinhiddenwifipage.cpp index 193d3da7..03315782 100644 --- a/src/frontend/netdetails/joinhiddenwifipage.cpp +++ b/src/frontend/netdetails/joinhiddenwifipage.cpp @@ -175,6 +175,18 @@ void JoinHiddenWiFiPage::initComponent() setJoinBtnEnable(); }); connect(m_nameEdit, &LineEdit::textChanged, this, &JoinHiddenWiFiPage::setJoinBtnEnable); + + connect(qApp, &QApplication::paletteChanged, this, &JoinHiddenWiFiPage::onPaletteChanged); + + const QByteArray id(THEME_SCHAME); + if(QGSettings::isSchemaInstalled(id)){ + QGSettings * fontSetting = new QGSettings(id, QByteArray(), this); + connect(fontSetting, &QGSettings::changed,[=](QString key) { + if ("themeColor" == key) { + onPaletteChanged(); + } + }); + } } void JoinHiddenWiFiPage::setJoinBtnEnable() diff --git a/src/frontend/netdetails/securitypage.cpp b/src/frontend/netdetails/securitypage.cpp index f5f7c4b1..ddcf1d13 100644 --- a/src/frontend/netdetails/securitypage.cpp +++ b/src/frontend/netdetails/securitypage.cpp @@ -63,6 +63,7 @@ void SecurityPage::initUI() secuTypeCombox = new QComboBox(this); pwdEdit = new KPasswordEdit(this); + pwdEdit->setUseCustomPalette(true); eapTypeCombox = new QComboBox(this); //TLS identityEdit = new LineEdit(this); @@ -72,6 +73,7 @@ void SecurityPage::initUI() clientCertPathCombox = new QComboBox(this); clientPrivateKeyCombox = new QComboBox(this); clientPrivateKeyPwdEdit = new KPasswordEdit(this); + clientPrivateKeyPwdEdit->setUseCustomPalette(true); pwdOptionCombox = new QComboBox(this); tlsWidget = new QWidget(this); @@ -79,6 +81,7 @@ void SecurityPage::initUI() eapMethodCombox = new QComboBox(this); userNameEdit = new LineEdit(this); userPwdEdit = new KPasswordEdit(this); + userPwdEdit->setUseCustomPalette(true); userPwdFlagBox = new QCheckBox(this); QWidget *queryWidget = new QWidget(this);