summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-04-08 12:23:22 +0300
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-04-08 12:23:22 +0300
commitea45bc05d4a464507c37efaec1da93aba068cd90 (patch)
treece14ef3712c4d197724ea74842967d464e204272 /indra/llui/llfloater.cpp
parent5c1563e2cbee162de52cee321edb8148016865ba (diff)
EXT-6733(normal) - Long title of voice popup notification is displayed out of window.
Fixed code calculating title buttons rectangle, LLRect::isValid() does not indicate uninitialized rectangle, as a result rectangle was not properly initialized and had negative width. Fixed title width. Reviewed by Mike Antipov - https://codereview.productengine.com/secondlife/r/194/ --HG-- branch : product-engine
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e672252a50..5fce1949a6 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1786,13 +1786,16 @@ void LLFloater::updateTitleButtons()
llround((F32)floater_close_box_size * mButtonScale));
}
- if(!buttons_rect.isValid())
+ // first time here, init 'buttons_rect'
+ if(1 == button_count)
{
buttons_rect = btn_rect;
}
else
{
- mDragOnLeft ? buttons_rect.mRight + btn_rect.mRight :
+ // if mDragOnLeft=true then buttons are on top-left side vertically aligned
+ // title is not displayed in this case, calculating 'buttons_rect' for future use
+ mDragOnLeft ? buttons_rect.mBottom -= btn_rect.mBottom :
buttons_rect.mLeft = btn_rect.mLeft;
}
mButtons[i]->setRect(btn_rect);