Some tooltips may need line breaks #1063

issue ghost opened this issue on April 8, 2012
  1. ghost commented at 7:05 PM on April 8, 2012: none

    Some tooltips in Settings > Options > Main are too long and cannot display all the text, at least when the screen resolution is 1024*768 (which I use on a good old 4/3 cathodic display). The screenshot should give an idea, and this problem also occurs in English, particularly with the tooltips of "Minimize on close" and "Pay transaction fee" options. Should \n strings be inserted there? (Bitcoin 0.6.0 running on Ubuntu 10.04)

    tooltip which may need a line break

    Also, when you click Settings > Options > Display, "Display addresses in transaction list" doesn't have a keyboard shortcut. As all other strings have one, I was wondering whether this one was forgotten (this remark is really secondary, IMHO it didn't make sense to file a separate bug for it).

  2. laanwj commented at 8:51 AM on April 9, 2012: member
    1. I think it's a pity that Qt doesn't break off long tooltip messages itself. How the hell are we (and translators) supposed to know how wide text gets rendered and what will, and will not run off the screen.

    2. Yes, that was forgotten when it was added.

  3. laanwj commented at 7:42 AM on April 13, 2012: member

    The recommended way to fix this appears to be to add <qt/> in front of the message to make sure Qt interprets it as rich text instead of plaintext, and can apply its own formatting algorithm. It would be preferable to do this automatically for all tooltips. I'd loathe having to track this individually for every translated message in every language.

    Edit: Looking at the Qt source, I think this could be implemented globally by listening for QEvent::ToolTipChange events, then rewriting the messages to prefix <qt/> if it is not yet rich text. See also:

  4. Diapolo commented at 9:50 AM on April 13, 2012: none

    @laanwj I think it could also be done by replacing \n with a HTML-br as this is what's done for the lock symbol in the client, if the wallet is encrypted and / or unlocked ... that tooltip seems to be rich text already, right? I think there are only 2-4 places at all, where HTML-tags are used directly in the strings. Your idea seems cleaner, so we would only have to remove the current br-Tags (the ones for bold text should remain).

  5. laanwj commented at 10:23 AM on April 13, 2012: member

    Yes, you are right, the programmatically generated tooltips will also have to be generated as rich text. \n will not do anything for formatting in rich text messages. If custom line breaks are desired, <br> should be used.

  6. laanwj referenced this in commit 62cf546b95 on Apr 13, 2012
  7. laanwj referenced this in commit 1ab7b54648 on Apr 13, 2012
  8. laanwj referenced this in commit 2d7fa3453e on Apr 13, 2012
  9. laanwj referenced this in commit a7fef7425a on Apr 13, 2012
  10. laanwj referenced this in commit 3829ef1626 on Apr 13, 2012
  11. laanwj referenced this in commit 15ac8e412b on Apr 14, 2012
  12. laanwj referenced this in commit 55a24209cc on Apr 14, 2012
  13. laanwj referenced this in commit 3793fa09ff on May 5, 2012
  14. laanwj closed this on May 11, 2012

  15. ghost commented at 5:58 PM on June 29, 2012: none

    <quote>then rewriting the tooltips to prefix <qt/> if it is not yet rich text.</quote> You sure that is works? On my side <qt/> is displayed as plain text and there are no line breaks, so apparently the content of the tool tip is considered as plain text rather than rich text. Here's an example with revision 5fa8396 on Ubuntu 10.04.4 with GNOME 2.30: tooltip glitch

  16. laanwj commented at 6:30 PM on June 29, 2012: member

    Works fine for me.

    What version of Qt?

  17. ghost commented at 9:01 PM on June 29, 2012: none

    On 29/06/12 20:30, Wladimir J. van der Laan wrote:

    Works fine for me.

    What version of Qt?

    Help > About Qt says "This program uses Qt version 4.6.2."

    One man alone can be pretty dumb sometimes, but for real bona fide stupidity, there ain't nothin' can beat teamwork.--Edward Abbey

  18. Diapolo commented at 9:55 PM on June 29, 2012: none

    @cardpuncher Can you upgrade, that's a rather old version ... we currently compile Bitcoin-Qt with 4.7.4 and available is 4.8.2.

  19. laanwj commented at 10:30 PM on June 29, 2012: member

    Yep, that's the cause, you can compile bitcoin-qt with Qt<4.7 but then you have some slight quirks such as missing placeholder text and, it seems, this.

  20. laanwj commented at 10:32 PM on June 29, 2012: member

    Btw the message says "Bitcon network"... lol that's one typo

  21. Diapolo commented at 11:07 PM on June 29, 2012: none

    That typo is awesome ^^.

    Edit: #1537

  22. coblee referenced this in commit f4e06139a4 on Jul 17, 2012
  23. coblee referenced this in commit d7eeb35c82 on Jul 17, 2012
  24. suprnurd referenced this in commit e32e28afb9 on Dec 5, 2017
  25. sanch0panza referenced this in commit 24c4608c38 on May 17, 2018
  26. lateminer referenced this in commit 04834fff67 on Oct 30, 2019
  27. DrahtBot locked this on Sep 8, 2021
  28. dhruv referenced this in commit 6f7e395acc on Jan 26, 2022
  29. hebasto referenced this in commit 065b6dbf9d on Jan 30, 2022
  30. dhruv referenced this in commit 139d4b881e on Feb 1, 2022
  31. fanquake referenced this in commit 8f8631d826 on Mar 17, 2022
  32. fanquake referenced this in commit 4bb1d7e62a on Mar 17, 2022
  33. fanquake referenced this in commit 465d05253a on Mar 30, 2022
  34. stratospher referenced this in commit 4d5afc9767 on Apr 3, 2022
  35. stratospher referenced this in commit 5b18493cfa on Apr 3, 2022
  36. fanquake referenced this in commit afb7a6fe06 on Apr 6, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me