summaryrefslogtreecommitdiff
path: root/indra/llui/lldraghandle.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-25 15:48:08 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2010-03-25 15:48:08 +0200
commit9ff6b6ecd123d3fcd71e189094cc9cb99eca9724 (patch)
tree66054689bfc138f27c399a63363333da737ef9cb /indra/llui/lldraghandle.cpp
parent0f32c14cab77717dab75b8d91302104e8f168ceb (diff)
Fixed low bug EXT-6444 - Long notecard titles continue under Locked and Help icons on title bar.
Changed the way floater title is reshaped. Calculations takes title buttons into account instead of using hardcoded values. --HG-- branch : product-engine
Diffstat (limited to 'indra/llui/lldraghandle.cpp')
-rw-r--r--indra/llui/lldraghandle.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp
index 832f148902..9d4e2fa495 100644
--- a/indra/llui/lldraghandle.cpp
+++ b/indra/llui/lldraghandle.cpp
@@ -248,15 +248,14 @@ void LLDragHandleTop::reshapeTitleBox()
return;
}
const LLFontGL* font = LLFontGL::getFontSansSerif();
- S32 title_width = font->getWidth( mTitleBox->getText() ) + TITLE_HPAD;
- if (getMaxTitleWidth() > 0)
- title_width = llmin(title_width, getMaxTitleWidth());
+ S32 title_width = getRect().getWidth();
+ title_width -= 2 * LEFT_PAD + 2 * BORDER_PAD + getButtonsRect().getWidth();
S32 title_height = llround(font->getLineHeight());
LLRect title_rect;
title_rect.setLeftTopAndSize(
LEFT_PAD,
getRect().getHeight() - title_vpad,
- getRect().getWidth() - LEFT_PAD - RIGHT_PAD,
+ title_width,
title_height);
// calls reshape on mTitleBox