summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Glebocki <[email protected]>2018-03-17 12:13:03 -0400
committerKurt Hindenburg <[email protected]>2018-03-17 12:59:44 -0400
commit6b8cf60adf51ffb601eae841b3a74e7d052318f9 (patch)
treebb78fbf404e6dc399835087614d94c8082f297ea
parenta9aad431f6fc56c6835df3a0767e43c0d542be2f (diff)
Fix search result rectangle position
Summary: Include top margin in the rectangle's vertical position, so it will be drawn in correct position when TerminalCenter is set and/or TerminalMargin is larget than 0. Preview: {F5756612} Test Plan: - Run `konsole -p TerminalMargin=8` - Display something - Run search and search for something - The blue rectangle should cover current result line Reviewers: #konsole, hindenburg Reviewed By: #konsole, hindenburg Subscribers: hindenburg, #konsole Tags: #konsole Differential Revision: https://phabricator.kde.org/D11412
-rw-r--r--src/TerminalDisplay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
index 13d3350..2b02102 100644
--- a/src/TerminalDisplay.cpp
+++ b/src/TerminalDisplay.cpp
@@ -1735,7 +1735,7 @@ void TerminalDisplay::drawCurrentResultRect(QPainter& painter)
return;
}
- QRect r(0, (_screenWindow->currentResultLine() - _screenWindow->currentLine())*_fontHeight,
+ QRect r(0, _contentRect.top() + (_screenWindow->currentResultLine() - _screenWindow->currentLine()) * _fontHeight,
contentsRect().width(), _fontHeight);
painter.fillRect(r, QColor(0, 0, 255, 80));
}