mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
qt msgbox: when using rich text, set text format to "AutoText" instead
"\n" newlines were ignored for WIF_HELP_TEXT InfoButtons
This commit is contained in:
parent
23ec426b4f
commit
d07caaf601
1 changed files with 5 additions and 1 deletions
|
@ -258,7 +258,11 @@ def custom_message_box(*, icon, parent, title, text, buttons=QMessageBox.Ok,
|
|||
d.setDefaultButton(defaultButton)
|
||||
if rich_text:
|
||||
d.setTextInteractionFlags(Qt.TextSelectableByMouse | Qt.LinksAccessibleByMouse)
|
||||
d.setTextFormat(Qt.RichText)
|
||||
# set AutoText instead of RichText
|
||||
# AutoText lets Qt figure out whether to render as rich text.
|
||||
# e.g. if text is actually plain text and uses "\n" newlines;
|
||||
# and we set RichText here, newlines would be swallowed
|
||||
d.setTextFormat(Qt.AutoText)
|
||||
else:
|
||||
d.setTextInteractionFlags(Qt.TextSelectableByMouse)
|
||||
d.setTextFormat(Qt.PlainText)
|
||||
|
|
Loading…
Add table
Reference in a new issue