diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 10:50:28 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 10:50:28 +0100 |
commit | 6690cd65c4e9bf6680f4f0b9ea2d38a80eb3d268 (patch) | |
tree | 41c7d5fbcbd875152db63e4fa1137e7d8dd67588 /indra/llui | |
parent | 5c29fa93838b4904fb236190bfe621cdfd33503c (diff) | |
parent | 9f0f610682e0bcceb88eaddcb7a02acfcf3d05ce (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lldraghandle.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llfloater.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index 9d4e2fa495..9f83fcca35 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -249,7 +249,7 @@ void LLDragHandleTop::reshapeTitleBox() } const LLFontGL* font = LLFontGL::getFontSansSerif(); S32 title_width = getRect().getWidth(); - title_width -= 2 * LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth(); + title_width -= LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth(); S32 title_height = llround(font->getLineHeight()); LLRect title_rect; title_rect.setLeftTopAndSize( diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a55e9c0395..79c47a1136 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1788,13 +1788,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); |