From 661601a99a2e6c69abba24a307bc64b70f2abfa6 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Fri, 5 Aug 2011 17:45:32 +0300 Subject: STORM-1309 WIP Fixed maturity rating icon overlapping the floater right border. The code that places it now takes into account possible text truncation. --- indra/newview/llfloaterbuyland.cpp | 4 +++- indra/newview/skins/default/xui/en/floater_buy_land.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index c643464825..8223e89b64 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -508,7 +508,9 @@ void LLFloaterBuyLandUI::updateCovenantInfo() LLIconCtrl* rating_icon = getChild("rating_icon"); LLRect rect = rating_icon->getRect(); - S32 icon_left_pad = region_name->getRect().mLeft + region_name->getTextBoundingRect().getWidth() + ICON_PAD; + S32 region_name_width = llmin(region_name->getRect().getWidth(), region_name->getTextBoundingRect().getWidth()); + S32 icon_left_pad = region_name->getRect().mLeft + region_name_width + ICON_PAD; + region_name->setToolTip(region_name->getText()); rating_icon->setRect(rect.setOriginAndSize(icon_left_pad, rect.mBottom, rect.getWidth(), rect.getHeight())); switch(sim_access) diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index b8a87a2063..22cc058e46 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -208,7 +208,7 @@ supports [AMOUNT2] objects name="region_name_text" top_delta="0" use_ellipses="true" - width="155"> + width="150"> (unknown)