When a font has fractional metrics, we could get visible gaps
between lines in a multi-line selection, if the bottom of the
rect was not aligned to the pixel grid. In Qt 5, this was
primarily an issue on macOS, but since making vertical metrics
consistent in f761ad3cd9, we
could also get this on other platforms, causing a regression
on these platforms.
The fix is to align the rect to the pixel grid.
[ChangeLog][Text] Fixed an issue where there would sometimes be
visible gaps in selections spanning multiple lines.
Pick-to: 6.2
Fixes: QTBUG-98372
Change-Id: I03cb1465602b6d78c60a0c764d920f7f092418a8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>