[LyX features/nakedrows] Add support for naked rows
Jean-Marc Lasgouttes
lasgouttes.lyx.org at free.fr
Sat Jul 16 16:44:10 UTC 2022
Le 16/07/2022 à 16:58, Jean-Marc Lasgouttes a écrit :
> The branch, nakedrows, has been created.
> at 8eb835181126c2c9a573ca52a90db533930dd5db (commit)
>
> - Log -----------------------------------------------------------------
>
> commit 8eb835181126c2c9a573ca52a90db533930dd5db
> Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
> Date: Sat Jul 16 15:43:46 2022 +0200
>
> Add support for naked rows
>
> A naked row is a Row object that has been created directly and is not
> related to a given paragraph. It is going to be useful to allow rich
> text in button labels, but other applications are possible.
For now this branch does nothing useful, and I have think about how to
continue it. The plan would be like:
* make RenderButton store a Row instead of a text (this allows to have
fancy styled and colored labels)
* Make InsetCollapsable use a RenderButton instead of a handmade button
* change Branch inset so that the branch name is striked out if the
branched is inverted (this was the starting point of the patch)
Other possibilities include using a red /!\ glyph for broken insets or
proper fonts for text preview in button of closed insets...
I am not sure when this will be finished though.
JMarc
>
> There is nothing that differentiates right now a naked Row object from
> a normal one. However, they are not manipulated in the same way.
>
> This patch adds support in two directions:
>
> - support for computing metrics directly (rather than through
> breakString and friends) in Row.cpp.
>
> - support for painting the row (when no Text object has been provided)
> in RowPainter.cpp.
>
> This code is not in use yet, so this patch is not supposed to modify behavior.
>
More information about the lyx-devel
mailing list