From 085eea68c36b9d1c3ea55fcdaabd371ec39125f2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 2 Aug 2017 22:57:46 +0200 Subject: [PATCH] GRAPHICS: MACGUI: Use proper dimensions for maxTextWidth in MacTextWindow --- graphics/macgui/mactextwindow.cpp | 6 +++--- graphics/macgui/macwindow.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index b3824f66bed..e12a9020d87 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -72,10 +72,10 @@ MacTextWindow::MacTextWindow(MacWindowManager *wm, const MacFont *font, int fgco void MacTextWindow::resize(int w, int h) { undrawInput(); - _maxWidth = w - kBorderWidth * 2; - _mactext->setMaxWidth(_maxWidth); - MacWindow::resize(w, h); + + _maxWidth = _innerDims.width(); + _mactext->setMaxWidth(_maxWidth); } void MacTextWindow::appendText(Common::String str, const MacFont *macFont, bool skipAdd) { diff --git a/graphics/macgui/macwindow.h b/graphics/macgui/macwindow.h index 2cda99164c9..3e7f474f239 100644 --- a/graphics/macgui/macwindow.h +++ b/graphics/macgui/macwindow.h @@ -308,6 +308,7 @@ protected: ManagedSurface _composeSurface; bool _borderIsDirty; + Common::Rect _innerDims; private: MacWindowBorder _macBorder; @@ -329,8 +330,6 @@ private: WindowClick _highlightedPart; float _scrollPos, _scrollSize; - Common::Rect _innerDims; - Common::String _title; };