aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-04-13 17:10:50 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-05-05 10:20:52 +0200
commit3793fa09ff920fc720dfad3738f105d2c9563662 (patch)
tree87e3a01f4fb1dea5c692d87fad087774fa2fbad7 /src/qt/bitcoin.cpp
parent4c9183e8bb6dc3faf80e301cf07c2d4d3abff405 (diff)
Allow Qt to wrap long tooltips (fixes #1063)
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.
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index e752269ca1..d0a158a02c 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -6,6 +6,7 @@
#include "walletmodel.h"
#include "optionsmodel.h"
#include "guiutil.h"
+#include "guiconstants.h"
#include "init.h"
#include "ui_interface.h"
@@ -164,6 +165,9 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(bitcoin);
QApplication app(argc, argv);
+ // Install global event filter that makes sure that long tooltips can be word-wrapped
+ app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
+
// Command-line options take precedence:
ParseParameters(argc, argv);