From 1a47b9727b08ca00ee60e9131230dd761a8d98fb Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Thu, 23 Mar 2017 14:31:01 +0400 Subject: [PATCH] Changed tooltip maximum width (bug #3800) --- apps/openmw/mwgui/tooltips.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index b3cc19a64..44ee6cac1 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -414,11 +414,11 @@ namespace MWGui const MyGUI::IntPoint padding(8, 8); - const int maximumWidth = 500; - const int imageCaptionHPadding = (caption != "" ? 8 : 0); const int imageCaptionVPadding = (caption != "" ? 4 : 0); + const int maximumWidth = MyGUI::RenderManager::getInstance().getViewSize().width - imageCaptionHPadding * 2; + std::string realImage = MWBase::Environment::get().getWindowManager()->correctIconPath(image); MyGUI::EditBox* captionWidget = mDynamicToolTipBox->createWidget("NormalText", MyGUI::IntCoord(0, 0, 300, 300), MyGUI::Align::Left | MyGUI::Align::Top, "ToolTipCaption");