[Scummvm-git-logs] scummvm master -> f24f262877872b209d538a8a3fd648a594dfc40e
sev-
noreply at scummvm.org
Sat Oct 14 19:27:49 UTC 2023
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:
e8f008aaba GRAPHICS: MACGUI: Fix indenting paragraphs in MacText
f24f262877 GRAPHICS: MACGUI: Fix indented paragraph wrapping in MacText
Commit: e8f008aabae68057216aa6416c6b3b239a8b3880
https://github.com/scummvm/scummvm/commit/e8f008aabae68057216aa6416c6b3b239a8b3880
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-10-14T12:27:28-07:00
Commit Message:
GRAPHICS: MACGUI: Fix indenting paragraphs in MacText
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index a1585b0dfcd..3b32a7b5a5f 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -686,12 +686,13 @@ void MacText::chopChunk(const Common::U32String &str, int *curLinePtr, int inden
_canvas._text.insert_at(curLine, MacTextLine());
_canvas._text[curLine].chunks.push_back(newchunk);
_canvas._text[curLine].indent = indent;
+ _canvas._text[curLine].firstLineIndent = 0;
} else {
_canvas._text[curLine].table->back().cells.back()._text.push_back(MacTextLine());
_canvas._text[curLine].table->back().cells.back()._text.back().chunks.push_back(newchunk);
}
- D(9, "** chopChunk, added line: \"%s\"", toPrintable(text[i].encode()).c_str());
+ D(9, "** chopChunk, added line (firstIndent: %d): \"%s\"", _canvas._text[curLine].firstLineIndent, toPrintable(text[i].encode()).c_str());
}
*curLinePtr = curLine;
@@ -782,6 +783,8 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
curTextLine = &_canvas._text[curLine];
+ firstLineIndent = curTextLine->firstLineIndent;
+
tmp.clear();
// If it is end of the line, we're done
Commit: f24f262877872b209d538a8a3fd648a594dfc40e
https://github.com/scummvm/scummvm/commit/f24f262877872b209d538a8a3fd648a594dfc40e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-10-14T12:27:28-07:00
Commit Message:
GRAPHICS: MACGUI: Fix indented paragraph wrapping in MacText
Since the total width was miscalculated, we ended up with chopped words
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 3b32a7b5a5f..40773d4ac5c 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -779,7 +779,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
// Okay, now we are either at the end of the line, or in the next
// chunk definition. That means, that we have to store the previous chunk
- chopChunk(tmp, &curLine, indentSize, _inTable ? -1 : _canvas._maxWidth);
+ chopChunk(tmp, &curLine, indentSize, _inTable ? -1 : _canvas._maxWidth - indentSize);
curTextLine = &_canvas._text[curLine];
More information about the Scummvm-git-logs
mailing list