fixed AboutDialog widget overlapping

This commit is contained in:
thrust26 2020-11-12 19:46:28 +01:00
parent c390b40a6d
commit 1a5a0b5286
1 changed files with 4 additions and 3 deletions

View File

@ -67,11 +67,12 @@ AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent,
addCancelWidget(b); addCancelWidget(b);
xpos = HBORDER; ypos = _th + VBORDER + (buttonHeight - fontHeight) / 2; xpos = HBORDER; ypos = _th + VBORDER + (buttonHeight - fontHeight) / 2;
myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - xpos * 2, fontHeight, int bwidth = font.getStringWidth("What's New" + ELLIPSIS) + fontWidth * 2.5;
"", TextAlign::Center);
myTitle = new StaticTextWidget(this, font, xpos + bwidth, ypos, _w - (xpos + bwidth) * 2,
fontHeight, "", TextAlign::Center);
myTitle->setTextColor(kTextColorEm); myTitle->setTextColor(kTextColorEm);
int bwidth = font.getStringWidth("What's New" + ELLIPSIS) + fontWidth * 2.5;
myWhatsNewButton = myWhatsNewButton =
new ButtonWidget(this, font, _w - HBORDER - bwidth, ypos - (buttonHeight - fontHeight) / 2, new ButtonWidget(this, font, _w - HBORDER - bwidth, ypos - (buttonHeight - fontHeight) / 2,
bwidth, buttonHeight, "What's New" + ELLIPSIS, kWhatsNew); bwidth, buttonHeight, "What's New" + ELLIPSIS, kWhatsNew);