File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1188,11 +1188,13 @@ void OptionsDialog::on_showTrayIcon_stateChanged(int state)
11881188
11891189void OptionsDialog::changeEvent (QEvent* e)
11901190{
1191+ // First let the base class update all child widget palettes
1192+ // required for qvalidatedlineedit invalid colors to update properly
1193+ QWidget::changeEvent (e);
11911194 if (e->type () == QEvent::PaletteChange) {
1195+ // Then update theme colors with the new palette
11921196 updateThemeColors ();
11931197 }
1194-
1195- QWidget::changeEvent (e);
11961198}
11971199
11981200void OptionsDialog::togglePruneWarning (bool enabled)
@@ -1308,6 +1310,13 @@ void OptionsDialog::updateThemeColors()
13081310 const QColor networkport_warning = networkport_dark ? QColor (" #FF8080" ) : QColor (" #FF0000" );
13091311 ui->networkPort ->setStyleSheet (QStringLiteral (" color: %1;" ).arg (networkport_warning.name ()));
13101312 }
1313+ // Re-trigger validation on all qvalidatedlineedit input fields to update their styling
1314+ // including background and text color
1315+ // Use setText to trigger validation
1316+ if (!ui->proxyIp ->isValid ()) ui->proxyIp ->setText (ui->proxyIp ->text ());
1317+ if (!ui->proxyPort ->isValid ()) ui->proxyPort ->setText (ui->proxyPort ->text ());
1318+ if (!ui->proxyIpTor ->isValid ()) ui->proxyIpTor ->setText (ui->proxyIpTor ->text ());
1319+ if (!ui->proxyPortTor ->isValid ()) ui->proxyPortTor ->setText (ui->proxyPortTor ->text ());
13111320}
13121321
13131322ProxyAddressValidator::ProxyAddressValidator (QObject *parent) :
You can’t perform that action at this time.
0 commit comments