Merge viewer-legacy-profiles
commit
56da70fa96
|
|
@ -35,7 +35,7 @@ LLFloaterChatVoiceVolume::LLFloaterChatVoiceVolume(const LLSD& key)
|
|||
void LLFloaterChatVoiceVolume::onOpen(const LLSD& key)
|
||||
{
|
||||
LLInspect::onOpen(key);
|
||||
LLUI::positionViewNearMouse(this);
|
||||
LLInspect::repositionInspector(key);
|
||||
}
|
||||
|
||||
LLFloaterChatVoiceVolume::~LLFloaterChatVoiceVolume()
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ void LLFloaterVoiceVolume::onOpen(const LLSD& data)
|
|||
// Extract appropriate avatar id
|
||||
mAvatarID = data["avatar_id"];
|
||||
|
||||
LLUI::positionViewNearMouse(this);
|
||||
LLInspect::repositionInspector(data);
|
||||
|
||||
getChild<LLUICtrl>("avatar_name")->setValue("");
|
||||
updateVolumeControls();
|
||||
|
|
|
|||
|
|
@ -147,3 +147,19 @@ bool LLInspect::childHasVisiblePopupMenu()
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLInspect::repositionInspector(const LLSD& data)
|
||||
{
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
// See LLToolTipMgr::createToolTip
|
||||
if (data.has("pos"))
|
||||
{
|
||||
LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUI::positionViewNearMouse(this);
|
||||
}
|
||||
applyRectControl();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ public:
|
|||
|
||||
/// Inspectors close themselves when they lose focus
|
||||
/*virtual*/ void onFocusLost();
|
||||
|
||||
void repositionInspector(const LLSD& data);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
#include "llfloater.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "lltextbox.h"
|
||||
#include "lltooltip.h" // positionViewNearMouse()
|
||||
#include "lltrans.h"
|
||||
|
||||
// <FS:Ansariel> Undo CHUI-90 and make avatar inspector useful again
|
||||
|
|
@ -320,17 +319,7 @@ void LLInspectAvatar::onOpen(const LLSD& data)
|
|||
getChild<LLUICtrl>("gear_btn")->setVisible(!self);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
// See LLToolTipMgr::createToolTip
|
||||
if (data.has("pos"))
|
||||
{
|
||||
LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUI::positionViewNearMouse(this);
|
||||
}
|
||||
LLInspect::repositionInspector(data);
|
||||
|
||||
// Generate link to avatar profile.
|
||||
// <FS:Ansariel> Undo CHUI-90 and make avatar inspector useful again
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
#include "llfloater.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llresmgr.h" // getMonetaryString()
|
||||
#include "lltooltip.h" // positionViewNearMouse()
|
||||
#include "lltrans.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llgroupiconctrl.h"
|
||||
|
|
@ -124,17 +123,7 @@ void LLInspectGroup::onOpen(const LLSD& data)
|
|||
|
||||
setGroupID(data["group_id"]);
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
// See LLToolTipMgr::createToolTip
|
||||
if (data.has("pos"))
|
||||
{
|
||||
LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUI::positionViewNearMouse(this);
|
||||
}
|
||||
LLInspect::repositionInspector(data);
|
||||
|
||||
// can't call from constructor as widgets are not built yet
|
||||
requestUpdate();
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@
|
|||
#include "lltextbox.h" // for description truncation
|
||||
#include "lltoggleablemenu.h"
|
||||
#include "lltrans.h"
|
||||
#include "llui.h" // positionViewNearMouse()
|
||||
#include "lluictrl.h"
|
||||
|
||||
class LLViewerObject;
|
||||
|
|
@ -202,17 +201,8 @@ void LLInspectObject::onOpen(const LLSD& data)
|
|||
{
|
||||
mObjectFace = data["object_face"];
|
||||
}
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
// See LLToolTipMgr::createToolTip
|
||||
if (data.has("pos"))
|
||||
{
|
||||
LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUI::positionViewNearMouse(this);
|
||||
}
|
||||
|
||||
LLInspect::repositionInspector(data);
|
||||
|
||||
// Promote hovered object to a complete selection, which will also force
|
||||
// a request for selected object data off the network
|
||||
|
|
|
|||
|
|
@ -124,17 +124,7 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
|
|||
// update the inspector with the current object state
|
||||
update();
|
||||
|
||||
// Position the inspector relative to the mouse cursor
|
||||
// Similar to how tooltips are positioned
|
||||
// See LLToolTipMgr::createToolTip
|
||||
if (data.has("pos"))
|
||||
{
|
||||
LLUI::positionViewNearMouse(this, data["pos"]["x"].asInteger(), data["pos"]["y"].asInteger());
|
||||
}
|
||||
else
|
||||
{
|
||||
LLUI::positionViewNearMouse(this);
|
||||
}
|
||||
LLInspect::repositionInspector(data);
|
||||
}
|
||||
|
||||
void LLInspectRemoteObject::onClickMap()
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id)
|
|||
panel_rect = panel->getRect();
|
||||
reshape(panel_rect.getWidth(), panel_rect.getHeight());
|
||||
|
||||
LLUI::positionViewNearMouse(this);
|
||||
LLInspect::repositionInspector(notification_id);
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
/>
|
||||
<panel
|
||||
name="panel_profile_web"
|
||||
label="Web"
|
||||
label="Feed"
|
||||
layout="topleft"
|
||||
class="panel_profile_web"
|
||||
filename="panel_profile_web.xml"
|
||||
|
|
|
|||
Loading…
Reference in New Issue