Browse Source
qt msgbox: when using rich text, set text format to "AutoText" instead
"\n" newlines were ignored for WIF_HELP_TEXT InfoButtons
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
1 deletions
-
electrum/gui/qt/util.py
|
@ -258,7 +258,11 @@ def custom_message_box(*, icon, parent, title, text, buttons=QMessageBox.Ok, |
|
|
d.setDefaultButton(defaultButton) |
|
|
d.setDefaultButton(defaultButton) |
|
|
if rich_text: |
|
|
if rich_text: |
|
|
d.setTextInteractionFlags(Qt.TextSelectableByMouse | Qt.LinksAccessibleByMouse) |
|
|
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: |
|
|
else: |
|
|
d.setTextInteractionFlags(Qt.TextSelectableByMouse) |
|
|
d.setTextInteractionFlags(Qt.TextSelectableByMouse) |
|
|
d.setTextFormat(Qt.PlainText) |
|
|
d.setTextFormat(Qt.PlainText) |
|
|