Available on crate feature
tooltip only.Expand description
A small label shown while the pointer rests on an element, or while something inside the element has keyboard focus.
A finger shows it while held. Once the finger lifts, the bubble stays closed until a mouse is used, so a tap on a phone does not leave it open.
iced has no general focus model, so the tooltip follows the widgets that report focus to operations: text fields, text editors and the focusable parts of this library. Focus that arrives with a pointer press, such as clicking into a field, does not show the bubble.
Structs§
Enums§
- Focus
- How focus reached the content, if it has it.
- Position
- Where the bubble appears relative to its element.
Constants§
- EDGE
- The bubble’s margin: the closest it comes to the window edges, and part of the space between it and its element.
- GAP
- Gap between the element and the bubble’s margin, in logical pixels.
- LONG_
LABEL - Labels longer than this many characters are sentences rather than
names, and read at
text_size::SMinstead oftext_size::XS.
Functions§
- label_
size - The text size of the bubble:
explicitwhen set, otherwise small for a short label and a size up for a longer one. - style
- The bubble style: inverted colours so it stands out from the page.
- tooltip
- Shows
labelin a bubble while the pointer is overcontent, or while something insidecontenthas keyboard focus.