Text, Image, and Badge
UTextLabel
File: src/widget/text_label.rs
Core fields:
textfont_sizecolorjustifylinebreakoverflowdefaults toEllipsis; useCliporVisiblewhen neededtruncate_sidecontrols whether ellipsis trims the start, end, or middle
Systems:
measure_text_label_layoutfit_node_to_text_sizesync_text_label_meshessync_text_clipper_materials
Local overflow is clipped per glyph quad, while ancestor UClip data is pushed into the text material for shader-side clipping.
UImage
File: src/widget/image.rs
- binds an image into the material path
sync_image_geometrykeeps rendered size aligned with layoutAuto,Content,MinContent, andMaxContentresolve to the native texture size once the image asset is availableUNodemin/maxconstraints still clamp the final solved image size after native measurement
UBadge and UTag
File: src/widget/badge.rs
- badge style presets
- dynamic badge styling lives in
UnivisBadgePlugin - this runtime is included by default through
UnivisWidgetPlugin - the dedicated plugin still remains available when you intentionally compose a narrower widget surface
Live Example
- use
cargo run --example widgets_displayforUBadge,UDivider,UProgressBar, andUPanel