Commit 6b8cf60a authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg

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
parent a9aad431
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment