Skip to content

Add TextArea support to ImageBrowser

This adds in support for Textareas, which allows (amongst other things) the creation of translations of comic books in acbf format. It is in early stages, and will require a bunch of work to make it work correctly, but... early steps are also steps.

The layouting algorithm will attempt to fit the text into a TextArea's arbitrarily shaped polygonal outline, by fitting QTextLines inside it, and incrementally pushing the font, from very small and upwards. There's space for optimisation, but it works.

Layouting text in a concave polygon:

image

Layouting text in an irregular polygon:

image

Layouting text and then rotating it:

image

Also, just because that'll be needed, here's some basic formatting

image

Of course, translations being the main point of this, switching between languages is a part of this MR as well:

image

image

Links in Textareas for internal use, such as showing References, like this super interesting one:

image

Links being a thing in Textareas, we handle them for internal use, but also for the external stuff, so be nice about that:

Screenshot_20210325_134431

Edited by Dan Leinir Turthra Jensen

Merge request reports