summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneltopinfobar.cpp
diff options
context:
space:
mode:
authorPaul Guslisty <pguslisty@productengine.com>2010-08-24 12:39:11 +0300
committerPaul Guslisty <pguslisty@productengine.com>2010-08-24 12:39:11 +0300
commitf305ddc7f773454826a09a8d52c33735eb7c95ea (patch)
treeea6259ee11252bd93bf488372c28148d14e6b287 /indra/newview/llpaneltopinfobar.cpp
parent76283d5cfb6923ba609533fcf71d5231060314df (diff)
EXT-7951 RESTORED IN VIEWER-DEVELOPMENT REPO (Mini-Location panel appearance design issues)
- Added callback on show\hide Mini Location Panel event. This callback sets proper initial minimized position depending on state (shown or hidded) Mini Location Panel. Also callback shifts vertically already minimized floaters so that they don't overlap Mini Location Panel Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/851/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpaneltopinfobar.cpp')
-rw-r--r--indra/newview/llpaneltopinfobar.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 15f7195b1a..640ff9cae7 100644
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -155,6 +155,8 @@ BOOL LLPanelTopInfoBar::postBuild()
mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this));
+ setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onShow, this, _2));
+
return TRUE;
}
@@ -168,6 +170,27 @@ void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged()
setParcelInfoText(new_text);
}
+// when panel is shown, all minimized floaters should be shifted to prevent overlapping of
+// PanelTopInfoBar. See EXT-7951.
+void LLPanelTopInfoBar::onShow(const LLSD& show)
+{
+ // this height is used as a vertical offset for ALREADY MINIMIZED floaters
+ // when PanelTopInfoBar visibility changes
+ S32 height = getRect().getHeight();
+
+ // this vertical offset is used for a start minimize position of floaters that
+ // are NOT MIMIMIZED YET
+ S32 minimize_pos_offset = 0;
+
+ if (show.asBoolean())
+ {
+ height = minimize_pos_offset = -height;
+ }
+
+ gFloaterView->shiftFloaters(0, height);
+ gFloaterView->setMinimizePositionVerticalOffset(minimize_pos_offset);
+}
+
void LLPanelTopInfoBar::draw()
{
updateParcelInfoText();