diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-08-12 13:19:23 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-08-12 13:19:23 +0300 |
commit | 7312471e7f6ed54170f8c38809b34a001bd7c82b (patch) | |
tree | 14f8b0d82a204843ebaf51b25ebea65383c4996b /indra/newview/llpaneltopinfobar.cpp | |
parent | ec28b9af16c7f5eb365b945743d85fe75cc8383f (diff) |
EXT-7951 FIXED (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.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 68dc1cdf71..e73d1fb7c2 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -161,6 +161,8 @@ BOOL LLPanelTopInfoBar::postBuild() mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this)); + setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChange, this, _2)); + return TRUE; } @@ -174,6 +176,27 @@ void LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged() setParcelInfoText(new_text); } +// when panel is shown, all minimized floaters should be shifted downwards to prevent overlapping of +// PanelTopInfoBar. See EXT-7951. +void LLPanelTopInfoBar::onVisibilityChange(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(); |