[Scummvm-git-logs] scummvm master -> d00c5d1c36d6e55ac4e6cba6d7aaf2baeda449fd
ysj1173886760
42030331+ysj1173886760 at users.noreply.github.com
Fri Aug 13 12:28:38 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
67e47115d0 DIRECTOR: apply line spacing for text castmember.
d00c5d1c36 DIRECTOR: fix _interLinear in mactext.
Commit: 67e47115d03e27dc4ce5e26775c4c0c7cd71a28b
https://github.com/scummvm/scummvm/commit/67e47115d03e27dc4ce5e26775c4c0c7cd71a28b
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-13T20:27:18+08:00
Commit Message:
DIRECTOR: apply line spacing for text castmember.
Changed paths:
engines/director/castmember.cpp
diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index f6f6e3ef06..0ebdc1a6d1 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -769,7 +769,7 @@ Graphics::MacWidget *TextCastMember::createWidget(Common::Rect &bbox, Channel *c
dims.right = MAX<int>(dims.right, dims.left + _initialRect.width());
dims.bottom = MAX<int>(dims.bottom, dims.top + _initialRect.height());
}
- widget = new Graphics::MacText(g_director->getCurrentWindow(), bbox.left, bbox.top, dims.width(), dims.height(), g_director->_wm, _ftext, macFont, getForeColor(), getBackColor(), _initialRect.width(), getAlignment(), 0, _borderSize, _gutterSize, _boxShadow, _textShadow, _textType == kTextTypeFixed);
+ widget = new Graphics::MacText(g_director->getCurrentWindow(), bbox.left, bbox.top, dims.width(), dims.height(), g_director->_wm, _ftext, macFont, getForeColor(), getBackColor(), _initialRect.width(), getAlignment(), _lineSpacing, _borderSize, _gutterSize, _boxShadow, _textShadow, _textType == kTextTypeFixed);
((Graphics::MacText *)widget)->setSelRange(g_director->getCurrentMovie()->_selStart, g_director->getCurrentMovie()->_selEnd);
((Graphics::MacText *)widget)->setEditable(_editable);
((Graphics::MacText *)widget)->draw();
Commit: d00c5d1c36d6e55ac4e6cba6d7aaf2baeda449fd
https://github.com/scummvm/scummvm/commit/d00c5d1c36d6e55ac4e6cba6d7aaf2baeda449fd
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-13T20:27:18+08:00
Commit Message:
DIRECTOR: fix _interLinear in mactext.
looks like it's the max text height, instead of the height of intervals of line.
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index c01e0cd127..2add60bb42 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -1057,10 +1057,10 @@ void MacText::recalcDims() {
// We must calculate width first, because it enforces
// the computation. Calling Height() will return cached value!
_textMaxWidth = MAX(_textMaxWidth, getLineWidth(i, true));
- y += getLineHeight(i) + _interLinear;
+ y += MAX(getLineHeight(i), _interLinear);
}
- _textMaxHeight = y - _interLinear;
+ _textMaxHeight = y;
if (!_fixedDims) {
int newBottom = _dims.top + _textMaxHeight + (2 * _border) + _gutter + _shadow;
More information about the Scummvm-git-logs
mailing list