[Scummvm-cvs-logs] scummvm master -> 3be846cfd7fdacf985334e05e60cd5a12aae526a
lordhoto
lordhoto at gmail.com
Sun Nov 24 00:18:27 CET 2013
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
129e891a87 GUI: Fix ListWidget::getEditRect's returned height.
e036aa76da GUI: Fix EditTextWidget::getEditRect's returned height.
aaad08c9fe GUI: Fix character redrawing behind caret in EditTextWidgets.
bb4a730a88 GUI: Fix out-of-bounds check in EditableWidget::drawCaret.
3be846cfd7 GUI: Draw caret over the whole height of the edit rect.
Commit: 129e891a875ad2df269e2b4b18bae7e2d2e57208
https://github.com/scummvm/scummvm/commit/129e891a875ad2df269e2b4b18bae7e2d2e57208
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-23T15:15:47-08:00
Commit Message:
GUI: Fix ListWidget::getEditRect's returned height.
Changed paths:
gui/widgets/list.cpp
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 8ecb313..8b8eb31 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -541,7 +541,7 @@ void ListWidget::drawWidget() {
}
Common::Rect ListWidget::getEditRect() const {
- Common::Rect r(_hlLeftPadding, 0, _w - _hlLeftPadding - _hlRightPadding, kLineHeight - 1);
+ Common::Rect r(_hlLeftPadding, 0, _w - _hlLeftPadding - _hlRightPadding, kLineHeight - 2);
const int offset = (_selectedItem - _currentPos) * kLineHeight + _topPadding;
r.top += offset;
r.bottom += offset;
Commit: e036aa76da22bbc9cc48d012469d2bad46018ff8
https://github.com/scummvm/scummvm/commit/e036aa76da22bbc9cc48d012469d2bad46018ff8
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-23T15:15:48-08:00
Commit Message:
GUI: Fix EditTextWidget::getEditRect's returned height.
Changed paths:
gui/widgets/edittext.cpp
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp
index 52527ef..c54ca57 100644
--- a/gui/widgets/edittext.cpp
+++ b/gui/widgets/edittext.cpp
@@ -101,7 +101,7 @@ void EditTextWidget::drawWidget() {
}
Common::Rect EditTextWidget::getEditRect() const {
- Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h - 1);
+ Common::Rect r(2 + _leftPadding, 2, _w - 2 - _leftPadding - _rightPadding, _h);
return r;
}
Commit: aaad08c9fe25f00813ddd19458a9c98d06e723cf
https://github.com/scummvm/scummvm/commit/aaad08c9fe25f00813ddd19458a9c98d06e723cf
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-23T15:15:48-08:00
Commit Message:
GUI: Fix character redrawing behind caret in EditTextWidgets.
This fixes an ugly y position change when the caret is moved to a character in
an edit text widget.
Changed paths:
gui/widgets/editable.cpp
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 667850d..c3354e5 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -277,7 +277,7 @@ void EditableWidget::drawCaret(bool erase) {
int chrWidth = g_gui.getCharWidth(_editString[_caretPos], _font);
const uint last = (_caretPos > 0) ? _editString[_caretPos - 1] : 0;
x += g_gui.getKerningOffset(last, _editString[_caretPos], _font);
- g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height() - 2), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
+ g_gui.theme()->drawText(Common::Rect(x, y, x + chrWidth, y + editRect.height()), chr, _state, Graphics::kTextAlignLeft, _inversion, 0, false, _font, ThemeEngine::kFontColorNormal, true, _textDrawableArea);
}
}
Commit: bb4a730a88f69917b02abcff943f7cdf2a9de8c7
https://github.com/scummvm/scummvm/commit/bb4a730a88f69917b02abcff943f7cdf2a9de8c7
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-23T15:15:48-08:00
Commit Message:
GUI: Fix out-of-bounds check in EditableWidget::drawCaret.
The line "y + editRect.height() + 2" is not included in drawing anymore. Thus
it is allowed to equal EditableWidget::_h.
Changed paths:
gui/widgets/editable.cpp
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index c3354e5..1129954 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -263,7 +263,7 @@ void EditableWidget::drawCaret(bool erase) {
x += getCaretOffset();
- if (y < 0 || y + editRect.height() - 2 >= _h)
+ if (y < 0 || y + editRect.height() - 2 > _h)
return;
x += getAbsX();
Commit: 3be846cfd7fdacf985334e05e60cd5a12aae526a
https://github.com/scummvm/scummvm/commit/3be846cfd7fdacf985334e05e60cd5a12aae526a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-23T15:15:48-08:00
Commit Message:
GUI: Draw caret over the whole height of the edit rect.
This improves the look of the editable widgets.
Changed paths:
gui/widgets/editable.cpp
diff --git a/gui/widgets/editable.cpp b/gui/widgets/editable.cpp
index 1129954..fca9702 100644
--- a/gui/widgets/editable.cpp
+++ b/gui/widgets/editable.cpp
@@ -263,13 +263,13 @@ void EditableWidget::drawCaret(bool erase) {
x += getCaretOffset();
- if (y < 0 || y + editRect.height() - 2 > _h)
+ if (y < 0 || y + editRect.height() > _h)
return;
x += getAbsX();
y += getAbsY();
- g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height() - 2), erase);
+ g_gui.theme()->drawCaret(Common::Rect(x, y, x + 1, y + editRect.height()), erase);
if (erase) {
if ((uint)_caretPos < _editString.size()) {
More information about the Scummvm-git-logs
mailing list