Placement of a text + icon pair inside rect:
More...
#include <gui_core/text/gui_icon_text_placement.h>
Placement of a text + icon pair inside rect:
- The icon always sits adjacent to its label, never at a stretched rect's edge.
- Left / Right: icon and text share one centre line. For Left, textRect is shifted past the icon so text-align: end can't render across it; for Right, textRect keeps rect.x and shrinks to reserve the icon area.
- Top / Bottom: icon is centred on the [icon, text] column. Top hugs rect's top; Bottom sits iconTextGap below the text, not at rect's bottom.
- Left / Right icons taller than the text may extend outside rect; the caller sizes rect via measurement when it wants them contained.
◆ textRect
| IntRect tachyon::IconTextPlacement::textRect |
◆ iconRect
| IntRect tachyon::IconTextPlacement::iconRect |
The documentation for this struct was generated from the following file: