In footer, the left/middle/right sections can be slightly differently heights

• Mar 10, 2019 - 20:27
Reported version
3.0
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

1) put texts into the left, middle, and right part of the footer.
2) The middle part is higher than the left and right parts.

I've attached screen shot, where a big font is used to illustrate the difference.

Attachment Size
Capture.PNG 24.1 KB

Comments

Title In footer, the text in the middle is higher than the texts in the left and right. In footer, the left/middle/right sections can be slightly differently heights

It's not that the middle is always higher, it's that the alignment is set to "bottom" rather than "baseline", means that any text that includes characters that extend below the baseline will be positioned differently than other text. In other words it depends on the text itself, not whether it is left, middle, or right.

Probably we should set the alignment to baseline instead of bottom, although I think we would also need to make sure this does the right thing in terms of actually putting the footer on the bottom of the page. WHile we're at it, we could conisider adding an offset as per #285361: Footer: add 5mm Y-offset to place within margin

Setting to baseline for elements with "page" currently makes them appear midway down page, but that's easy enough to fix too, in the layout for textbase...

are you talking about this alignment(because of the footer)? Here it is not even set to bottom. or are you talking about the alignment in the textbase.cpp file where the allignment is set to bottom.

Attachment Size
Untitled.png 175.94 KB

Neither, actually - regardless of the style setting, we actually force footers to bottom alignment in page.cpp, in drawHeaderFooter(). If I change that to use baseline, the position is wrong, so it's unfortunately not quite as simple a fix as that.

Yes, that and the other two similar lines (4, 5, and 6 are for left, middle, and right sections of the footer) I tried BASELINE instead of BOTTOM, and unfortunately the footer was drawn halfway down the page instead of at the margin. So we would have to change something about how we calculate the vertical position of text set to baseline alignment, and do it in a way that doesn't break anything else. I think that's likely to be a fairly delicate operation and not as easy I first thought.