Skip to content

Commit

Permalink
qt: Wrap tooltips in the intro window
Browse files Browse the repository at this point in the history
Summary: This is a backport of [[bitcoin-core/gui#20 | core-gui#20]]

Test Plan:
Open the intro window and check that the tooltips are wrapped (hover the cursor on the "enable pruning" checkbox)
`src/qt/bitcoin-qt --regtest -choosedatadir`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10676
  • Loading branch information
hebasto authored and PiRK committed Dec 15, 2021
1 parent 6cabd8d commit 53d9a53
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,11 @@ int GuiMain(int argc, char *argv[]) {
return EXIT_SUCCESS;
}

// Install global event filter that makes sure that long tooltips can be
// word-wrapped
app.installEventFilter(
new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));

/// 5. Now that settings and translations are available, ask user for data
/// directory. User language is set up: pick a data directory.
bool did_show_intro = false;
Expand Down Expand Up @@ -739,10 +744,6 @@ int GuiMain(int argc, char *argv[]) {
#endif // ENABLE_WALLET

/// 9. Main GUI initialization
// Install global event filter that makes sure that long tooltips can be
// word-wrapped.
app.installEventFilter(
new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
// Install global event filter that makes sure that out-of-focus labels do
// not contain text cursor.
app.installEventFilter(new GUIUtil::LabelOutOfFocusEventFilter(&app));
Expand Down

0 comments on commit 53d9a53

Please sign in to comment.