diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimconversation.cpp | 32 | ||||
-rw-r--r-- | indra/newview/llimconversation.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 2 |
3 files changed, 13 insertions, 24 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index ec7e0ee6cb..ec534b903d 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -43,7 +43,6 @@ const F32 REFRESH_INTERVAL = 0.2f; LLIMConversation::LLIMConversation(const LLUUID& session_id) : LLTransientDockableFloater(NULL, true, session_id) , mIsP2PChat(false) - , mWasHosted(false) , mExpandCollapseBtn(NULL) , mTearOffBtn(NULL) , mCloseBtn(NULL) @@ -224,26 +223,17 @@ void LLIMConversation::hideOrShowTitle() { bool is_hosted = getHost() != NULL; - if (mWasHosted != is_hosted) - { - mWasHosted = is_hosted; - LLView* floater_contents = getChild<LLView>("contents_view"); - LLRect contents_rect = floater_contents->getRect(); - - if (is_hosted) - { - // we don't show the header when the floater is hosted, so reshape floater contents - // to occupy the header space. - contents_rect.mTop += getHeaderHeight(); - } - else - { - // reduce the floater contents height by header height - contents_rect.mTop -= getHeaderHeight(); - } - - floater_contents->setShape(contents_rect); - } + const LLFloater::Params& default_params = LLFloater::getDefaultParams(); + S32 floater_header_size = default_params.header_height; + LLView* floater_contents = getChild<LLView>("contents_view"); + + LLRect floater_rect = getLocalRect(); + S32 top_border_of_contents = floater_rect.mTop - (is_hosted? 0 : floater_header_size); + LLRect handle_rect (0, floater_rect.mTop, floater_rect.mRight, top_border_of_contents); + LLRect contents_rect (0, top_border_of_contents, floater_rect.mRight, floater_rect.mBottom); + mDragHandle->setShape(handle_rect); + mDragHandle->setVisible(! is_hosted); + floater_contents->setShape(contents_rect); } void LLIMConversation::hideAllStandardButtons() diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index e6b4f534cc..c3dff96d5d 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -89,12 +89,11 @@ protected: void buildParticipantList(); void onSortMenuItemClicked(const LLSD& userdata); - void hideOrShowTitle(); + void hideOrShowTitle(); // toggle the floater's drag handle void hideAllStandardButtons(); bool mIsNearbyChat; bool mIsP2PChat; - bool mWasHosted; LLLayoutPanel* mParticipantListPanel; LLParticipantList* mParticipantList; diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 95f6708e96..560e1be213 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -9,7 +9,7 @@ can_dock="false" can_minimize="true" can_close="true" - save_rect="true" + save_rect="false" visible="false" width="394" can_resize="true" |