diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-18 13:17:06 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-18 13:17:06 -0700 |
commit | 18e5fa5bbd2f78b4fa6eee8b72666fa9aeb2100e (patch) | |
tree | 2b18b184a4f6ea28db14ff796fb41ec300d8acd9 /indra/newview/llimfloatercontainer.cpp | |
parent | 2301c7cff60eca879f605a3ee3f26b960597d8c3 (diff) | |
parent | c43cfcdcbd243410e2f780f58f93100e96fc996c (diff) |
merging in latest changes
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 5d328bb283..c4eeccecbe 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -286,32 +286,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id) // virtual void LLIMFloaterContainer::computeResizeLimits(S32& new_min_width, S32& new_min_height) { - bool is_left_pane_expanded = !mConversationsPane->isCollapsed(); - bool is_right_pane_expanded = !mMessagesPane->isCollapsed(); - - S32 conversations_pane_min_dim = mConversationsPane->getMinDim(); - - if (is_right_pane_expanded) + // possibly increase floater's minimum height according to children's minimums + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) { - S32 conversations_pane_width = - (is_left_pane_expanded ? gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") : conversations_pane_min_dim); - - // possibly increase minimum size constraint due to children's minimums. - for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); + if (floaterp) { - LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); - if (floaterp) - { - new_min_width = llmax(new_min_width, - floaterp->getMinWidth() + conversations_pane_width + LLPANEL_BORDER_WIDTH * 2); - new_min_height = llmax(new_min_height, floaterp->getMinHeight()); - } + new_min_height = llmax(new_min_height, floaterp->getMinHeight()); } } - else - { - new_min_width = conversations_pane_min_dim; - } + + S32 conversations_pane_min_dim = mConversationsPane->getRelevantMinDim(); + S32 messages_pane_min_dim = mMessagesPane->getRelevantMinDim(); + + // set floater's minimum width according to relevant minimal children's dimensionals + new_min_width = conversations_pane_min_dim + messages_pane_min_dim + LLPANEL_BORDER_WIDTH*2; } void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) |