]> git.lyx.org Git - features.git/commit
Improve handling of top and bottom margin
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 12 Jul 2020 18:11:27 +0000 (20:11 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 12 Jul 2020 18:32:04 +0000 (20:32 +0200)
commitff7cdf1b74f5c17a966af24dc70d49fc162f007e
tree94cd52cc21a951f8631db350380d703f87bdab4a
parent90dccf89e36206183687ae2289450cca8879bb47
Improve handling of top and bottom margin

The 20px space on top and bottom of document have traditionally been
obtained by adding the to the ascent/descent of the first/last row.
This reads to annoyances like selections that are drawn in these
margins and issues with the nesting marker.

The change is to add the values to a separate member of the Row
object, and to add new Row::total(Ascent|Descent) methods that add the
effect of this padding.

Moreover, some methods are added to TextMetrics to simplify the
BufferView code.

Fixes bug #9545.
src/BufferView.cpp
src/BufferView.h
src/Row.cpp
src/Row.h
src/TextMetrics.cpp
src/TextMetrics.h
src/frontends/qt/GuiWorkArea.cpp
src/insets/InsetTabular.cpp