From 826cef90af275f28e3842f933bb50414578f5982 Mon Sep 17 00:00:00 2001 From: "dries.k" Date: Sat, 8 Apr 2023 11:40:00 +0200 Subject: [PATCH] set focus when verifying server info --- gotify_tray/gui/widgets/ServerInfoDialog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gotify_tray/gui/widgets/ServerInfoDialog.py b/gotify_tray/gui/widgets/ServerInfoDialog.py index 9c74d16..b87e039 100644 --- a/gotify_tray/gui/widgets/ServerInfoDialog.py +++ b/gotify_tray/gui/widgets/ServerInfoDialog.py @@ -54,18 +54,21 @@ class ServerInfoDialog(QtWidgets.QDialog, Ui_Dialog): self.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok).setEnabled( True ) + self.buttonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Ok).setFocus() def incorrect_token_callback(self, version: GotifyVersionModel): self.pb_test.setEnabled(True) self.label_server_info.setText(f"Version: {version.version}") self.pb_test.setStyleSheet("background-color: rgba(255, 0, 0, 100);") self.line_token.setStyleSheet("border: 1px solid red;") + self.line_token.setFocus() def incorrect_url_callback(self): self.pb_test.setEnabled(True) self.label_server_info.clear() self.pb_test.setStyleSheet("background-color: rgba(255, 0, 0, 100);") self.line_url.setStyleSheet("border: 1px solid red;") + self.line_url.setFocus() def import_success_callback(self): self.line_url.setText(settings.value("Server/url", type=str))