diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2009-10-30 21:28:52 -0600 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2009-10-30 21:28:52 -0600 |
| commit | 01d06db0154e0cfc43c82664c6bf6129a3fa4883 (patch) | |
| tree | 3e842ddedf605d6883be7f04de55c173c38aa46b /indra/llui/llmultifloater.cpp | |
| parent | 801301c435414df1e22c321a685044b7cd43055e (diff) | |
| parent | 9abcf6684e86b0b8c2d343ccd4864b2e854be3d7 (diff) | |
sync to the tip.
Diffstat (limited to 'indra/llui/llmultifloater.cpp')
| -rw-r--r-- | indra/llui/llmultifloater.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp index e8ce1a8d97..78738c826d 100644 --- a/indra/llui/llmultifloater.cpp +++ b/indra/llui/llmultifloater.cpp @@ -54,7 +54,8 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params) void LLMultiFloater::buildTabContainer() { - static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0); + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; LLTabContainer::Params p; p.name(std::string("Preview Tabs")); @@ -131,7 +132,8 @@ BOOL LLMultiFloater::closeAllFloaters() void LLMultiFloater::growToFit(S32 content_width, S32 content_height) { static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0); - static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0); + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size; S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2); S32 new_height = llmax(getRect().getHeight(), content_height + floater_header_size + tabcntr_header_height); @@ -432,6 +434,7 @@ void LLMultiFloater::onTabSelected() void LLMultiFloater::setCanResize(BOOL can_resize) { LLFloater::setCanResize(can_resize); + if (!mTabContainer) return; if (isResizable() && mTabContainer->getTabPosition() == LLTabContainer::BOTTOM) { mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); @@ -455,13 +458,16 @@ BOOL LLMultiFloater::postBuild() } mTabContainer = getChild<LLTabContainer>("Preview Tabs"); + + setCanResize(mResizable); return TRUE; } void LLMultiFloater::updateResizeLimits() { static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0); - static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0); + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size; // initialize minimum size constraint to the original xml values. S32 new_min_width = mOrigMinWidth; |
