mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Avoid extra space in tooltips
When using QTextDocument to check the natutal size of a text, one has
to remove the text margin, which is not useful here.
Fixes bug #11353.
(cherry picked from commit 7db99672e6
)
This commit is contained in:
parent
e5f7f6493a
commit
c1df5fb6ef
@ -645,6 +645,7 @@ QString formatToolTip(QString text, int em)
|
||||
QTextDocument td("");
|
||||
td.setHtml(text);
|
||||
td.setDefaultFont(QToolTip::font());
|
||||
td.setDocumentMargin(0);
|
||||
td.setTextWidth(px_width);
|
||||
double best_width = td.idealWidth();
|
||||
// Set the line wrapping with appropriate width
|
||||
|
@ -181,6 +181,8 @@ What's new
|
||||
|
||||
- Fix display of overset, underset, and stackrel insets (bug 11367).
|
||||
|
||||
- Avoid extra space at the end of tooltips (bug 11353).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user