Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format placeholder text and hide on focus #594

Closed
sssoleileraaa opened this issue Oct 25, 2019 · 1 comment · Fixed by #597
Closed

Format placeholder text and hide on focus #594

sssoleileraaa opened this issue Oct 25, 2019 · 1 comment · Fixed by #597

Comments

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Oct 25, 2019

Description

Currently the text Compose a reply to [sourcename] remains in front of the cursor in the ReplyBoxWidget until you start typing. It should be removed as soon as soon as textbox is active. It also needs to be updated so that it is formatted to match the Zeplin screen so that the source name is:

  • font and font size: Montserrat-Bold
  • size: 18px
  • letter spacing: 0.25px
  • color: #24276d

and the Compose a reply part is:

  • font and font size: Montserrat-Regular
  • size: 18px
  • color: #404040
@deeplow
Copy link
Contributor

deeplow commented Oct 28, 2019

It seems that we are fighting against the nature of Qt. Here are my findings so far:

  • QTextEdit.setPlaceholderText() does NOT allow html as input (although this is not documented)
  • QTextEdit.setText() allows for html but for some reason it does not work if we wanted to set it as a "placeholder" (meaning that we cannot setText as soon as the text box is created) - again, undocumented behavior.

We need the html in order to format the source name with bold.

Probably just adding a label on top the text box with the formatting is the best we can do to circumvent these limitations

deeplow added a commit to deeplow/securedrop-client that referenced this issue Oct 28, 2019
deeplow added a commit to deeplow/securedrop-client that referenced this issue Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants