aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-04-20 08:14:55 +0000
committerTorbjörn Andersson2006-04-20 08:14:55 +0000
commitb6783677b5c4f3133cfdc963e626fd836340ac59 (patch)
tree10a88abe323fb75b54be5251d568a87ff54f5944
parent04efb67f21f541bb743c0df4fd59b4c63dd2bb77 (diff)
downloadscummvm-rg350-b6783677b5c4f3133cfdc963e626fd836340ac59.tar.gz
scummvm-rg350-b6783677b5c4f3133cfdc963e626fd836340ac59.tar.bz2
scummvm-rg350-b6783677b5c4f3133cfdc963e626fd836340ac59.zip
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
-rw-r--r--gui/ListWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 07a3cd25fd..4803153950 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -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;