Skip to content

Commit

Permalink
Merge pull request #1306 from freedomofpress/fix-1286
Browse files Browse the repository at this point in the history
hide ReplyTextEdit when deletion of conversation in progress
  • Loading branch information
conorsch authored Sep 29, 2021
2 parents ee4f55f + 785dbdc commit 6af6d9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3750,6 +3750,7 @@ def start_deletion(self):
self.setStyleSheet(css)

self.reply_box.text_edit.setDisabled(True)
self.reply_box.text_edit.hide()
self.reply_box.send_button.setDisabled(True)
self.conversation_title_bar.setDisabled(True)
self.conversation_view.hide()
Expand All @@ -3768,7 +3769,8 @@ def end_deletion(self):
self.reply_box.setStyleSheet(css)
self.setStyleSheet(css)

self.reply_box.setEnabled(True)
self.reply_box.text_edit.setEnabled(True)
self.reply_box.text_edit.show()
self.reply_box.send_button.setEnabled(True)
self.conversation_title_bar.setEnabled(True)
self.conversation_view.show()
Expand Down Expand Up @@ -3925,6 +3927,10 @@ def __init__(self, source, controller):

self.setObjectName("ReplyTextEdit")

retain_space = self.sizePolicy()
retain_space.setRetainSizeWhenHidden(True)
self.setSizePolicy(retain_space)

self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.setTabChangesFocus(True) # Needed so we can TAB to send button.
self.setCursor(QCursor(Qt.IBeamCursor))
Expand Down

0 comments on commit 6af6d9e

Please sign in to comment.