From 37640257db73be17c02e936bfb3993fc3e6216af Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 25 Oct 2022 10:52:52 +0200 Subject: [PATCH] Editor: Fix painting highlights on scrollbar The document layout rounds up the height of lines in QTextLayout::boundingRect, so we have to do the same for calculating the position of highlights on the scrollbar. Fixes: QTCREATORBUG-28299 Change-Id: I36496ebec7fe7861feff7cb8a2647a11ee078b8f Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp b/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp index 75736bb6810..222631ad140 100644 --- a/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp +++ b/src/plugins/coreplugin/find/highlightscrollbarcontroller.cpp @@ -360,7 +360,7 @@ void HighlightScrollBarController::setScrollArea(QAbstractScrollArea *scrollArea double HighlightScrollBarController::lineHeight() const { - return m_lineHeight; + return ceil(m_lineHeight); } void HighlightScrollBarController::setLineHeight(double lineHeight)