-
Notifications
You must be signed in to change notification settings - Fork 819
Labels
a:textText rendering, fonts, Text input (mS,bF)Text rendering, fonts, Text input (mS,bF)
Milestone
Description
This task is derived from #2723 but with a focus solely on providing the APIs to feed attributed text into Slint and rendering, NOT to support the end-user editing said text.
The following feature set for attributes is in scope:
- Hyperlinks (including way of handling clicks)
- Text colors
- Style: Bold, Italic, Underline
- Unordered/ordered lists
List of things to do before this issue is done:
- better interpolation handling. The following should work:
@markdown("# Foo {}", @markdown("*Bar*"))/@markdown("`{}`", "Some`Code`With`Quote");(this may mean doing the interpolation as part of the parsing instead of escaping) - Document the
StyledTextelement in the language reference (including an inline example with screenshot, as well as what type of styling is supported) - C++ Api needs a way of constructing a StyledText from markdown (including a unit test)
- Make sure the software renderer doesn't panic when rendering a
StyledTextelement - A test in
tests/cases/elementsthat constructs aStyledTextelement in Slint and thestyled-textis exposed to Rust and C++, and it can be read and written from Rust and C++. Verify that the preferred-height is greater than zero when a text is set, so that when the test is run, the entire parsing and layout code path as well as the code generator is covered. - Produce compile errors when invalid markdown is used with
@markdown(). (extendinternal/compiler/tests/syntax/basic/markdown.slint) - One last API review before the next release.
- Extend the widgets gallery example to show hyperlinks, text colours, styles (bold/italic/underline) and unordered/ordered lists.
- Add a test for the
StyledText::link-clickedcallback. Send a synthetic mouse click in a new or existing test undertests/casesand verify the callback was invoked. - Add
Slint.open-url(string)function #10513
Reactions are currently unavailable
Sub-issues
Metadata
Metadata
Assignees
Labels
a:textText rendering, fonts, Text input (mS,bF)Text rendering, fonts, Text input (mS,bF)