Closed danielstuart14 closed 2 weeks ago
@tronical there seems to have happened an error during the Qt download for the automated tests. Is it possible to rerun the tests?
Yes, sure :)
There seems to be an overall issue with GH actions right now. I'll try again later.
If you’d like you can rebase your changes, but I think the CI part is fine. The failures are unrelated I think.
Thank you :)
As discussed in here https://github.com/slint-ui/slint/issues/5374, this PR adds the possibility of using character wrapping (aka wrap anywhere) with text. Prior to this, it was only possible to wrap at word boundaries.
This commit adds this functionality to both Qt and software renderer, with skia and femtovg missing it for now (falling back to word-wrap).
The trait RendererSealed had to be changed to pass to text_size if using this new kind of wrapping.
This was based on GTK wrap mode which has the following options:
no-wrap
on slintchar-wrap
with this PR (on Qt and software renderer for now)word-wrap
with Qt renderer (Qt supports WrapAtWordBoundaryOrAnywhere but would need Qt 6.3 as we use QFontMetrics to find the text size https://doc.qt.io/qt-6/qfontmetrics.html#boundingRect-2)word-wrap
with the other renderers (Verified with software and femtovg).