aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-15 11:35:56 +0100
committerEugene Sandulenko2019-12-15 11:36:26 +0100
commit6862a4934cdc8d0845c2d6e9b89410115f118e32 (patch)
treee8bfd9cb2975614946b2039d651426a9dc8b3c4a /graphics
parentfc396469630ca3caf2b7bcc6f50f0b3bd6abc2c3 (diff)
downloadscummvm-rg350-6862a4934cdc8d0845c2d6e9b89410115f118e32.tar.gz
scummvm-rg350-6862a4934cdc8d0845c2d6e9b89410115f118e32.tar.bz2
scummvm-rg350-6862a4934cdc8d0845c2d6e9b89410115f118e32.zip
GRAPHICS: MACGUI: Lessen size of paragraph spacing
Diffstat (limited to 'graphics')
-rw-r--r--graphics/macgui/mactext.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index fa70861600..afc78a117d 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -377,16 +377,23 @@ int MacText::getLineWidth(int line, bool enforce) {
int width = 0;
int height = 0;
+ bool hastext = false;
+
for (uint i = 0; i < _textLines[line].chunks.size(); i++) {
if (enforce)
_textLines[line].chunks[i].font = nullptr;
- if (!_textLines[line].chunks[i].text.empty())
+ if (!_textLines[line].chunks[i].text.empty()) {
width += _textLines[line].chunks[i].getFont()->getStringWidth(_textLines[line].chunks[i].text);
+ hastext = true;
+ }
height = MAX(height, _textLines[line].chunks[i].getFont()->getFontHeight());
}
+ if (!hastext)
+ height -= 3;
+
_textLines[line].width = width;
_textLines[line].height = height;