diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-19 12:19:11 +0200 |
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-19 12:19:11 +0200 |
| commit | 58439da4c696f8dd6002e6399e4563cbda251a1e (patch) | |
| tree | 261b81d6f3492b020852a03f8b358aabfd040836 /indra/newview/llpanelplaceinfo.cpp | |
| parent | da2a0cfceb9fbc7c66f23f8820309f36b6629530 (diff) | |
| parent | 88cce61b09d225df0bcd8aab9dbd2c5a01ee7e19 (diff) | |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
| -rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 963d39de8a..6ba3790fe2 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -57,7 +57,11 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), mParcelID(), mRequestedID(), - mPosRegion() + mPosRegion(), + mScrollingPanelMinHeight(0), + mScrollingPanelWidth(0), + mScrollingPanel(NULL), + mScrollContainer(NULL) {} //virtual @@ -83,6 +87,12 @@ BOOL LLPanelPlaceInfo::postBuild() mMaturityRatingIcon = getChild<LLIconCtrl>("maturity_icon"); mMaturityRatingText = getChild<LLTextBox>("maturity_value"); + mScrollingPanel = getChild<LLPanel>("scrolling_panel"); + mScrollContainer = getChild<LLScrollContainer>("place_scroll"); + + mScrollingPanelMinHeight = mScrollContainer->getScrolledViewRect().getHeight(); + mScrollingPanelWidth = mScrollingPanel->getRect().getWidth(); + return TRUE; } @@ -231,6 +241,27 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } // virtual +void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLPanel::reshape(width, height, called_from_parent); + + if (!mScrollContainer || !mScrollingPanel) + return; + + static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); + + S32 scroll_height = mScrollContainer->getRect().getHeight(); + if (mScrollingPanelMinHeight >= scroll_height) + { + mScrollingPanel->reshape(mScrollingPanelWidth, mScrollingPanelMinHeight); + } + else + { + mScrollingPanel->reshape(mScrollingPanelWidth + scrollbar_size, scroll_height); + } +} + +// virtual void LLPanelPlaceInfo::handleVisibilityChange(BOOL new_visibility) { LLPanel::handleVisibilityChange(new_visibility); |
