visualdynamics.gui.tooltips¶
tooltips
¶
Long tooltips wrap.
Qt draws a plain-text tooltip on one line however long it is, and the
bar's tooltips (what each icon does, in a sentence) ran across most of
the screen. A tooltip given as rich text wraps, so a plain tooltip wider
than WRAP_CHARACTERS is stored as a paragraph of that width when it is
set. Short tooltips, and the rich-text ones the app writes itself, are
stored as they are.
The wrapping happens in setToolTip itself, on widgets, actions and the
items of trees, tables and lists (install), because every tooltip the
app has is set through one of those. A bar button takes its action's
tooltip, so it wraps with it.
Functions:
| Name | Description |
|---|---|
wrapped |
|
plain |
A tooltip's words, whether or not it was wrapped: what a reader |
wrap_if_long |
|
install |
Make every long tooltip set from now on wrap; once only. |
Functions:¶
wrapped
¶
text as rich text that wraps at width pixels, its own line
breaks kept.
Source code in src/visualdynamics/gui/tooltips.py
plain
¶
A tooltip's words, whether or not it was wrapped: what a reader sees, for the code and tests that read tooltips back.
Source code in src/visualdynamics/gui/tooltips.py
wrap_if_long
¶
text as a wrapping paragraph when it is plain text wider than
WRAP_CHARACTERS; otherwise text unchanged.
Source code in src/visualdynamics/gui/tooltips.py
install
¶
Make every long tooltip set from now on wrap; once only.