diff --git a/securedrop_client/gui/widgets.py b/securedrop_client/gui/widgets.py index 0c8c402612..139a5a09a0 100644 --- a/securedrop_client/gui/widgets.py +++ b/securedrop_client/gui/widgets.py @@ -2690,13 +2690,19 @@ def configure_buttons(self): if self.dangerous: self.cancel_button.setAutoDefault(True) - self.continue_button.setDefault(False) + self.cancel_button.setDefault(False) self.cancel_button.setObjectName("ModalDialog_primary_button") + + self.continue_button.setAutoDefault(False) + self.continue_button.setDefault(False) self.continue_button.setObjectName("ModalDialog_cancel_button") else: self.cancel_button.setAutoDefault(False) - self.continue_button.setDefault(True) + self.cancel_button.setDefault(False) self.cancel_button.setObjectName("ModalDialog_cancel_button") + + self.continue_button.setAutoDefault(True) + self.continue_button.setDefault(False) self.continue_button.setObjectName("ModalDialog_primary_button") button_box.addButton(self.cancel_button, QDialogButtonBox.ActionRole) @@ -2714,15 +2720,6 @@ def configure_buttons(self): return window_buttons - def keyPressEvent(self, event: QKeyEvent): - if event.key() == Qt.Key_Enter or event.key() == Qt.Key_Return: - if self.cancel_button.hasFocus(): - self.cancel_button.click() - else: - self.continue_button.click() - else: - super().keyPressEvent(event) - def animate_activestate(self): self.continue_button.setIcon(QIcon(self.button_animation.currentPixmap())) diff --git a/securedrop_client/resources/css/sdclient.css b/securedrop_client/resources/css/sdclient.css index e9577acb36..7d121438ff 100644 --- a/securedrop_client/resources/css/sdclient.css +++ b/securedrop_client/resources/css/sdclient.css @@ -472,10 +472,6 @@ QWidget#FileWidget_horizontal_line { color: #ff3366; } -#ModalDialog_button_box { - border: 1px solid #ff0000; -} - #ModalDialog_button_box QPushButton { margin: 0px 0px 0px 12px; height: 40px;