From 1a5a0b5286cfd67a403a9ccbd16d2e7fa85f77fd Mon Sep 17 00:00:00 2001 From: thrust26 Date: Thu, 12 Nov 2020 19:46:28 +0100 Subject: [PATCH] fixed AboutDialog widget overlapping --- src/gui/AboutDialog.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/AboutDialog.cxx b/src/gui/AboutDialog.cxx index db088d923..426adbeeb 100644 --- a/src/gui/AboutDialog.cxx +++ b/src/gui/AboutDialog.cxx @@ -67,11 +67,12 @@ AboutDialog::AboutDialog(OSystem& osystem, DialogContainer& parent, addCancelWidget(b); xpos = HBORDER; ypos = _th + VBORDER + (buttonHeight - fontHeight) / 2; - myTitle = new StaticTextWidget(this, font, xpos, ypos, _w - xpos * 2, fontHeight, - "", TextAlign::Center); + int bwidth = font.getStringWidth("What's New" + ELLIPSIS) + fontWidth * 2.5; + + myTitle = new StaticTextWidget(this, font, xpos + bwidth, ypos, _w - (xpos + bwidth) * 2, + fontHeight, "", TextAlign::Center); myTitle->setTextColor(kTextColorEm); - int bwidth = font.getStringWidth("What's New" + ELLIPSIS) + fontWidth * 2.5; myWhatsNewButton = new ButtonWidget(this, font, _w - HBORDER - bwidth, ypos - (buttonHeight - fontHeight) / 2, bwidth, buttonHeight, "What's New" + ELLIPSIS, kWhatsNew);