TODO: Make this use StringView
| 405 | |
| 406 | //TODO: Make this use StringView |
| 407 | int GuiContext::stringInterfaceWidth(String const& s) { |
| 408 | if (interfaceScale()) { |
| 409 | // font size is already adjusted UP by interfaceScale, so we have to adjust |
| 410 | // it back down |
| 411 | return stringWidth(s) / interfaceScale(); |
| 412 | } |
| 413 | return 0; |
| 414 | } |
| 415 | |
| 416 | StringList GuiContext::wrapText(String const& s, Maybe<unsigned> wrapWidth) { |
| 417 | return textPainter()->wrapText(s, wrapWidth); |