]> git.lyx.org Git - lyx.git/commit
Fix display of a math hull inset in a tight inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 14 Jul 2023 00:13:18 +0000 (02:13 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 14 Jul 2023 15:17:23 +0000 (17:17 +0200)
commit4bbd4a45e7494363903801540102150886fa2c6b
tree0731ddd952ea99e16af784dc2df011e5c0bbdebf
parentbf69b7b3a7be02e995879aeb70a7b33e104cbcc9
Fix display of a math hull inset in a tight inset

This is a kind of hack. This allows InsetMathHull to state that it
needs some elbow room beyond its width, in order to fit the numbering
and/or the left margin (with left alignment), which are outside of the
inset itself.

To this end, InsetMathHull::metrics() sets a value in
MetricsInfo::extrawidth and this value is recorded later in the
corresponding row element's `extra' field.

The code could be reorganized to be simpler, in particular by
computing metrics in tokenizeRow, or after tokenizeRow. However the
choice here is to produce a simple patch, fit for 2.4.0.

Fixes bug #12320.
src/MetricsInfo.cpp
src/MetricsInfo.h
src/Row.cpp
src/RowPainter.cpp
src/TextMetrics.cpp
src/mathed/InsetMathHull.cpp