GRAPHICS: MACGUI: Fix fgcolor conversion in MacText

This commit is contained in:
Scott Percival
2024-01-20 23:14:52 +01:00
committed by Eugene Sandulenko
parent 2f16bf2e9f
commit b9003c145f
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -429,7 +429,7 @@ const Common::U32String::value_type *MacTextCanvas::splitString(const Common::U3
D(9, "** splitString[i]: %d%% fname: '%s' alt: '%s' title: '%s' ext: '%s'",
_text[curLine].picpercent,
_text[curLine].picfname.c_str(), _text[curLine].picalt.encode().c_str(),
_text[curLine].picfname.toString().c_str(), _text[curLine].picalt.encode().c_str(),
_text[curLine].pictitle.encode().c_str(), _text[curLine].picext.encode().c_str());
break;
}
+5 -1
View File
@@ -125,7 +125,11 @@ MacText::MacText(MacWidget *parent, int x, int y, int w, int h, MacWindowManager
_defaultFormatting = MacFontRun(_wm);
_defaultFormatting.font = wm->_fontMan->getFont(*macFont);
byte r, g, b;
_wm->_pixelformat.colorToRGB(fgcolor, r, g, b);
if (_wm->_pixelformat.bytesPerPixel == 4) {
_wm->decomposeColor<uint32>(fgcolor, r, g, b);
} else {
_wm->decomposeColor<byte>(fgcolor, r, g, b);
}
_defaultFormatting.setValues(_wm, macFont->getId(), macFont->getSlant(), macFont->getSize(), r, g, b);
} else {
_defaultFormatting.font = NULL;