Skip to content

Commit

Permalink
alter send & stop button visibility on sending
Browse files Browse the repository at this point in the history
  • Loading branch information
juzeon committed Aug 7, 2023
1 parent 3c433ad commit 3ff840c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 178,7 @@ def change_backend():

self.stop_button = QPushButton('Stop')
self.stop_button.clicked.connect(self.stop_responding_task)
self.stop_button.setDisabled(True)
self.stop_button.setVisible(False)

self.revoke_button = QPushButton('Revoke')
self.revoke_button.clicked.connect(self.revoke_edit)
Expand Down Expand Up @@ -225,9 225,9 @@ def on_save():
bottom_half_buttons.addWidget(self.visual_search_button)
bottom_half_buttons.addWidget(self.document_button)
bottom_half_buttons.addWidget(self.browse_button)
bottom_half_buttons.addWidget(self.stop_button)
bottom_half_buttons.addWidget(self.revoke_button)
bottom_half_buttons.addWidget(self.quick_button)
bottom_half_buttons.addWidget(self.stop_button)
bottom_half_buttons.addWidget(self.send_button)
bottom_half_layout.addWidget(self.user_input)

Expand Down Expand Up @@ -876,7 876,8 @@ def set_responding(self, responding):
self.del_workspace_button.setDisabled(responding)
self.rename_workspace_button.setDisabled(responding)
self.clear_workspace_button.setDisabled(responding)
self.stop_button.setDisabled(not responding)
self.stop_button.setVisible(responding)
self.send_button.setVisible(not responding)
self.quick_button.setDisabled(responding)

def presets_changed(self, new_value: str):
Expand Down

0 comments on commit 3ff840c

Please sign in to comment.