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 @@ -1202,11 +1202,13 @@ void OptionsDialog::on_showTrayIcon_stateChanged(int state)
12021202
12031203void OptionsDialog::changeEvent (QEvent* e)
12041204{
1205+ // First let the base class update all child widget palettes
1206+ // required for qvalidatedlineedit invalid colors to update properly
1207+ QWidget::changeEvent (e);
12051208 if (e->type () == QEvent::PaletteChange) {
1209+ // Then update theme colors with the new palette
12061210 updateThemeColors ();
12071211 }
1208-
1209- QWidget::changeEvent (e);
12101212}
12111213
12121214bool OptionsDialog::eventFilter (QObject *object, QEvent *event)
@@ -1331,6 +1333,13 @@ void OptionsDialog::updateThemeColors()
13311333 const QColor networkport_warning = networkport_dark ? QColor (" #FF8080" ) : QColor (" #FF0000" );
13321334 ui->networkPort ->setStyleSheet (QStringLiteral (" color: %1;" ).arg (networkport_warning.name ()));
13331335 }
1336+ // Re-trigger validation on all qvalidatedlineedit input fields to update their styling
1337+ // including background and text color
1338+ // Use setText to trigger validation
1339+ if (!ui->proxyIp ->isValid ()) ui->proxyIp ->setText (ui->proxyIp ->text ());
1340+ if (!ui->proxyPort ->isValid ()) ui->proxyPort ->setText (ui->proxyPort ->text ());
1341+ if (!ui->proxyIpTor ->isValid ()) ui->proxyIpTor ->setText (ui->proxyIpTor ->text ());
1342+ if (!ui->proxyPortTor ->isValid ()) ui->proxyPortTor ->setText (ui->proxyPortTor ->text ());
13341343}
13351344
13361345ProxyAddressValidator::ProxyAddressValidator (QObject *parent) :
You can’t perform that action at this time.
0 commit comments