Skip to content

Commit

Permalink
Merge pull request #686 from ntoll/fix-partial-render
Browse files Browse the repository at this point in the history
Work around (not bug fix) for issue #684.
  • Loading branch information
kushaldas authored Jan 9, 2020
2 parents 01c824d + 55ff2ff commit ceae5f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2667,16 +2667,19 @@ def focusOutEvent(self, e):
super(ReplyTextEdit, self).focusOutEvent(e)

def set_logged_in(self):
source_name = "<strong><font color=\"#24276d\">%s</font></strong>" % \
self.source.journalist_designation
self.setEnabled(True)
source_name = "<strong><font color=\"#24276d\">{}</font></strong>".format(
self.source.journalist_designation
)
placeholder = _("Compose a reply to ") + source_name
self.placeholder.setText(placeholder)
self.setEnabled(True)
self.placeholder.adjustSize()

def set_logged_out(self):
text = "<strong><font color=\"#2a319d\">" + _("Sign in") + " </font></strong>" + \
_("to compose or send a reply")
self.placeholder.setText(text)
self.placeholder.adjustSize()
self.setEnabled(False)

def setText(self, text):
Expand Down

0 comments on commit ceae5f0

Please sign in to comment.