slint
slint copied to clipboard
Add support for text underline/overline/strikeout
Besides the existing support for font-italic, font-weight, and font-size, we should also support text line decorations, such as underline, overline, strikeout.
The number of properties are becoming a little too much, so part of the acceptance criteria for this issue should also be that we can keep a nice API with what looks like individual properties, but in the implementation attempt to consolidate these into fewer Property instances.
We can have a pass that lowers all these property to a struct {italic: bool, underline:bool, striked: bool, weight: u16, size: length}
What properties exactly will he have?
I think it makes sense to keep some property appart like size
Yes, size makes sense to keep apart. Combining italic, underline, etc. might be worth it.
I wonder how to handle a case like this:
component Foo inherits Text {
font-underline: { some expression }
}
component Bar {
in-out property <bool> font-italic;
Foo {
font-underline <=> font-italic;
}
}
I can see how we could perhaps at compile time combine multiple binding expressions into one big binding expression for a struct, but how could this be done when there's a two-way binding on one of the fields?