summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneltopinfobar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneltopinfobar.cpp')
-rw-r--r--indra/newview/llpaneltopinfobar.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 5ed23d2f42..eb4c7572d4 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -203,6 +203,11 @@ void LLPanelTopInfoBar::onVisibilityChange(const LLSD& show)
gFloaterView->setMinimizePositionVerticalOffset(minimize_pos_offset);
}
+boost::signals2::connection LLPanelTopInfoBar::setResizeCallback( const resize_signal_t::slot_type& cb )
+{
+ return mResizeSignal.connect(cb);
+}
+
void LLPanelTopInfoBar::draw()
{
updateParcelInfoText();
@@ -224,6 +229,7 @@ void LLPanelTopInfoBar::buildLocationString(std::string& loc_str, bool show_coor
void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
{
+ LLRect old_rect = getRect();
const LLFontGL* font = mParcelInfoText->getDefaultFont();
S32 new_text_width = font->getWidth(new_text);
@@ -235,6 +241,11 @@ void LLPanelTopInfoBar::setParcelInfoText(const std::string& new_text)
mParcelInfoText->reshape(rect.getWidth(), rect.getHeight(), TRUE);
mParcelInfoText->setRect(rect);
layoutParcelIcons();
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
void LLPanelTopInfoBar::update()
@@ -342,6 +353,8 @@ void LLPanelTopInfoBar::updateHealth()
void LLPanelTopInfoBar::layoutParcelIcons()
{
+ LLRect old_rect = getRect();
+
// TODO: remove hard-coded values and read them as xml parameters
static const int FIRST_ICON_HPAD = 32;
static const int LAST_ICON_HPAD = 11;
@@ -358,6 +371,11 @@ void LLPanelTopInfoBar::layoutParcelIcons()
LLRect rect = getRect();
rect.set(rect.mLeft, rect.mTop, left + LAST_ICON_HPAD, rect.mBottom);
setRect(rect);
+
+ if (old_rect != getRect())
+ {
+ mResizeSignal();
+ }
}
S32 LLPanelTopInfoBar::layoutWidget(LLUICtrl* ctrl, S32 left)