Skip to main content

text_code_wrap

Function text_code_wrap 

Source
pub fn text_code_wrap<H: UiHost>(
    cx: &mut ElementContext<'_, H>,
    text: impl Into<Arc<str>>,
) -> AnyElement
Expand description

Declarative helper intended for code-like inline text.

Defaults:

  • monospace font (metric.font.mono_size / metric.font.mono_line_height)
  • TextWrap::Grapheme so long tokens (paths/URLs/identifiers) can still wrap when needed