If I understand things correctly, this should fix the caret drawing in list

widgets. (The glitch was most noticeable in the modern theme.)

svn-id: r22052
This commit is contained in:
Torbjörn Andersson 2006-04-20 08:14:55 +00:00
parent 04efb67f21
commit b6783677b5

View File

@ -375,8 +375,8 @@ void ListWidget::drawWidget(bool hilite) {
}
Common::Rect ListWidget::getEditRect() const {
Common::Rect r(_hlLeftPadding, 1, _w - _hlLeftPadding - _hlRightPadding, kLineHeight);
const int offset = (_selectedItem - _currentPos) * kLineHeight;
Common::Rect r(_hlLeftPadding, 0, _w - _hlLeftPadding - _hlRightPadding, kLineHeight - 1);
const int offset = (_selectedItem - _currentPos) * kLineHeight + _topPadding;
r.top += offset;
r.bottom += offset;