Skip to content

Conversation

laanwj
Copy link
Member

@laanwj laanwj commented Apr 13, 2012

Allow Qt to word-wrap tooltips, should fix #1063. Qt can only word-wrap rich text messages.

Implemented without having to touch any translation: by listening for QEvent::ToolTipChange events, then rewriting the tooltips to prefix <qt/> and convert to rich text if it is not yet rich text.

@Diapolo
Copy link

Diapolo commented Apr 13, 2012

So
can be used in strings for a word-wrap and \n will be replaced by it? Seems like a very good solution. Only question I have left is, if we can set a default width of tooltips.

Try it with the current version, if you hover the lock-icon if your wallet is encrypted. This is rich text, but looks kind of ugly, because of the small width of the tooltip.

@laanwj
Copy link
Member Author

laanwj commented Apr 13, 2012

I'm not sure where it gets the default width from (which is indeed extremely narrow). Couldn't find any documentation about that. That leaves looking in the Qt source I guess...

@Diapolo
Copy link

Diapolo commented Apr 13, 2012

But you could verify that the default is to narrow, so this is no Win specific behaviour?

@laanwj
Copy link
Member Author

laanwj commented Apr 13, 2012

No, it isn't specific to any OS. This seems to make the tooltips wider (crazily wide, in this case), for example:

app.setStyleSheet("QToolTip { min-width: 500px; }");

@laanwj
Copy link
Member Author

laanwj commented Apr 13, 2012

I've added a min-width of 350px, this looks like a nice tradeoff between too narrow and too wide.

@Diapolo
Copy link

Diapolo commented Apr 13, 2012

Tried it and it's way better than before, I agree it's a nice tradeoff until we comeup with a even nicer solution in the future :).

@laanwj
Copy link
Member Author

laanwj commented Apr 13, 2012

Shouldn't worry too much about this, there's way more serious issues to solve first.

@gavinandresen
Copy link
Contributor

ACK

@Diapolo
Copy link

Diapolo commented Apr 29, 2012

This should get in 0.6.1 as the detach db tooltip is quite long ;).

@laanwj
Copy link
Member Author

laanwj commented Apr 30, 2012

No, I don't think it's a good idea to merge this between release candidates. That's only for critical bugfixes. There's the possibility that this introduces problems in some place / language so it needs testing. Better to merge it after 0.6.1.

@Diapolo
Copy link

Diapolo commented Apr 30, 2012

It was targetted for 0.6.1 and I reminded of that fact ;). There are quite a few commits that could have been merged in before the RC1.

@luke-jr
Copy link
Member

luke-jr commented May 2, 2012

This makes tooltip windows too wide sometimes:
http://luke.dashjr.org/tmp/screenshots/snapshot82.png

@laanwj
Copy link
Member Author

laanwj commented May 2, 2012

Yea, it only works if a minimum width is set, otherwise it makes them too
narrow. Qt can either size the boxes to the text or the text to the boxes,
not both.

Implemented without having to touch any translation: by listening for QEvent::ToolTipChange events, then rewriting the tooltips to prefix `<qt/>` if it is not yet rich text.
@laanwj
Copy link
Member Author

laanwj commented May 5, 2012

Rebased, and added a useful heuristic to only do this for long tooltips, where "long" is defined as longer than a certain length in characters. This fixes @luke-jr's issue.

@Diapolo
Copy link

Diapolo commented May 6, 2012

ACK

laanwj added a commit that referenced this pull request May 11, 2012
Allow Qt to wrap long tooltips (fixes #1063)
@laanwj laanwj merged commit b8a5e30 into bitcoin:master May 11, 2012
coblee pushed a commit to litecoin-project/litecoin that referenced this pull request Jul 17, 2012
@laanwj laanwj deleted the 2012_04_wraptooltips branch April 9, 2014 14:14
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Dec 25, 2019
…fixed.

a25afdc [Bug][GUI] Fix, topbar sync progressbar expanded with the expandable view. (furszy)

Pull request description:

  The sync progressBar was not been expanded following the sync expandable button size. This PR fixes it.

  Solving bitcoin#1090

ACKs for top commit:
  Fuzzbawls:
    ACK a25afdc
  random-zebra:
    ACK a25afdc

Tree-SHA512: 834ce61a1caa4b709c8762d6d8c3538ce68ed99b188fd913610a3b2d922c6331a636fad90873decfd86d0a74cb554c6ae101d2da2c7c3ab1a310494cd9d9506c
dexX7 added a commit to dexX7/bitcoin that referenced this pull request Mar 12, 2020
3a9e113 Only evaluate fee cache, when it's activated (dexX7)

Pull request description:

  The fee cache used for the fee distribution is only needed, when the feature of fee distribution is activated. When this is not the case, it's just a performance burdon, which can easily take 0.3 additional seconds, when a new block is processed.

Tree-SHA512: 13167bac8df157f2ddfe977b6fb68b1ba69439ce300d98b25c0356277e032ba0f40eb093720efb4e8fec9e2b3406febef98cdb3c8b2f902274106594793e99ec
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some tooltips may need line breaks
4 participants