mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Take the height of label into account when painting rows
Handle the case where, in beamer's Frame, for example, where the label string uses a taller font then the paragraph itself. Fixes bug #11890.
This commit is contained in:
parent
b299bd9730
commit
bce21e8975
@ -1145,6 +1145,14 @@ void TextMetrics::setRowHeight(Row & row) const
|
||||
int maxasc = int(fm.maxAscent() * spacing_val);
|
||||
int maxdes = int(fm.maxDescent() * spacing_val);
|
||||
|
||||
// Take label string into account (useful if labelfont is large)
|
||||
if (row.pos() == 0 && layout.labelIsInline()) {
|
||||
FontInfo const labelfont = text_->labelFont(par);
|
||||
FontMetrics const & lfm = theFontMetrics(labelfont);
|
||||
maxasc = max(maxasc, int(lfm.maxAscent() * spacing_val));
|
||||
maxdes = max(maxdes, int(lfm.maxDescent() * spacing_val));
|
||||
}
|
||||
|
||||
// Find the ascent/descent of the row contents
|
||||
for (Row::Element const & e : row) {
|
||||
if (e.inset) {
|
||||
|
Loading…
Reference in New Issue
Block a user