From 338914bd7d7e776d3ca5a4eb9a579fcbe53cf1b9 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Mon, 24 Oct 2011 14:17:15 +0200 Subject: EXP-1400 FIXED (Call request docking icon overlays other toolbar buttons when speak button in side toolbar) - LLDockableFloater::getDockTongue to init dock tongue with proper image depending on floater dock side, also added images for left and right tongues. - Added proper call floater positioning relatively to the speak button --- indra/newview/llimview.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 33c6b2218c..c751394455 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1681,7 +1681,8 @@ BOOL LLCallDialog::postBuild() return FALSE; LLView *anchor_panel = gToolBarView->findChildView("speak"); - setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP)); + LLDockControl::DocAt dock_pos = getDockControlPos(); + setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos)); setUseTongue(anchor_panel); @@ -1751,6 +1752,22 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) } } +LLDockControl::DocAt LLCallDialog::getDockControlPos() +{ + LLToolBar* tool_bar = NULL; + + if((tool_bar = gToolBarView->getChild("toolbar_left")) && tool_bar->hasChild("speak", true)) + { + return LLDockControl::RIGHT; // Speak button in the left toolbar so the call floater should be to the right of the speak button + } + else if((tool_bar = gToolBarView->getChild("toolbar_right")) && tool_bar->hasChild("speak", true)) + { + return LLDockControl::LEFT; // Speak button in the right toolbar so the call floater should be to the left of the speak button + } + + return LLDockControl::TOP; +} + bool LLCallDialog::lifetimeHasExpired() { if (mLifetimeTimer.getStarted()) -- cgit v1.2.3