meow-7.2.2
Leyla Farazha 2011-10-06 17:19:41 -07:00
commit 1bd5fd7edc
12 changed files with 56 additions and 34 deletions

View File

@ -177,6 +177,7 @@ void LLToolBar::initFromParams(const LLToolBar::Params& p)
center_panel_p.rect = getLocalRect();
center_panel_p.auto_resize = false;
center_panel_p.user_resize = false;
center_panel_p.mouse_opaque = false;
LLLayoutPanel* center_panel = LLUICtrlFactory::create<LLLayoutPanel>(center_panel_p);
mCenteringStack->addChild(center_panel);
@ -557,7 +558,13 @@ void LLToolBar::draw()
{
if (mButtons.empty())
{
return;
mButtonPanel->setVisible(FALSE);
mButtonPanel->setMouseOpaque(FALSE);
}
else
{
mButtonPanel->setVisible(TRUE);
mButtonPanel->setMouseOpaque(TRUE);
}
// Update enable/disable state and highlight state for editable toolbars
@ -741,7 +748,11 @@ BOOL LLToolBarButton::handleHover(S32 x, S32 y, MASK mask)
// llinfos << "Merov debug: handleHover, x = " << x << ", y = " << y << ", mouse = " << hasMouseCapture() << llendl;
BOOL handled = FALSE;
if (hasMouseCapture() && mStartDragItemCallback && mHandleDragItemCallback)
S32 mouse_distance_squared = (x - mMouseDownX) * (x - mMouseDownX) + (y - mMouseDownY) * (y - mMouseDownY);
S32 drag_threshold = LLUI::sSettingGroups["config"]->getS32("DragAndDropDistanceThreshold");
if (mouse_distance_squared > drag_threshold * drag_threshold
&& hasMouseCapture() &&
mStartDragItemCallback && mHandleDragItemCallback)
{
if (!mIsDragged)
{
@ -768,3 +779,8 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask)
// Always highlight toolbar buttons, even if they are disabled
mNeedsHighlight = TRUE;
}
void LLToolBarButton::onMouseCaptureLost()
{
mIsDragged = false;
}

View File

@ -68,6 +68,7 @@ public:
void setHandleDragCallback(tool_handledrag_callback_t cb) { mHandleDragItemCallback = cb; }
void onMouseEnter(S32 x, S32 y, MASK mask);
void onMouseCaptureLost();
private:
LLCommandId mId;

View File

@ -96,9 +96,9 @@
label_ref="Command_Inventory_Label"
tooltip_ref="Command_Inventory_Tooltip"
execute_function="Floater.ToolbarToggle"
execute_parameters="inventory"
execute_parameters="my_inventory"
is_running_function="Floater.IsOpen"
is_running_parameters="inventory"
is_running_parameters="my_inventory"
/>
<command name="map"
available_in_toybox="true"

View File

@ -803,7 +803,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
LLViewerObject* hit_obj = pick_info.getObject();
LLSelectMgr::getInstance()->unhighlightAll();
bool highlight_object = false;
// Treat attachments as part of the avatar they are attached to.
if (hit_obj != NULL)
{
@ -845,16 +845,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
{
target = DT_OBJECT;
hit_face = pick_info.mObjectFace;
// if any item being dragged will be applied to the object under our cursor
// highlight that object
for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
{
if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
{
LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
break;
}
}
highlight_object = true;
}
}
else if (pick_info.mPickType == LLPickInfo::PICK_LAND)
@ -900,6 +891,19 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info)
}
}
if (highlight_object && mLastAccept > ACCEPT_NO_LOCKED)
{
// if any item being dragged will be applied to the object under our cursor
// highlight that object
for (S32 i = 0; i < (S32)mCargoIDs.size(); i++)
{
if (mCargoTypes[i] != DAD_OBJECT || (pick_info.mKeyMask & MASK_CONTROL))
{
LLSelectMgr::getInstance()->highlightObjectAndFamily(hit_obj);
break;
}
}
}
ECursorType cursor = acceptanceToCursor( mLastAccept );
gViewerWindow->getWindow()->setCursor( cursor );

View File

@ -6,7 +6,7 @@
name="floaterland"
help_topic="floaterland"
save_rect="true"
title="ABOUT LAND"
title="About land"
width="490">
<floater.string
name="maturity_icon_general">

View File

@ -5,7 +5,7 @@
height="465"
name="gestures"
help_topic="gestures"
title="GESTURES"
title="Gestures"
background_visible="true"
follows="all"
label="Places"

View File

@ -6,9 +6,10 @@
height="588"
layout="topleft"
name="floater_my_appearance"
help_topic="appearance"
save_rect="true"
single_instance="true"
title="MY APPEARANCE"
title="Appearance"
width="333">
<panel
top="18"

View File

@ -9,7 +9,7 @@
name="floater_my_inventory"
save_rect="true"
save_visibility="true"
title="My Inventory"
title="Inventory"
width="333" >
<panel
class="sidepanel_inventory"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
can_minimize="false"
can_minimize="true"
can_close="true"
follows="left|top"
height="520"
@ -10,7 +10,7 @@
help_topic="snapshot"
save_rect="true"
save_visibility="true"
title="SNAPSHOT PREVIEW"
title="Snapshot preview"
width="245">
<floater.string
name="unknown">

View File

@ -2,14 +2,14 @@
<floater
can_resize="true"
can_minimize="true"
can_close="false"
can_close="true"
height="205"
layout="topleft"
min_height="124"
min_width="190"
name="floater_voice_controls"
help_topic="floater_voice_controls"
title="Voice Controls"
title="Voice controls"
save_dock_state="true"
save_visibility="true"
save_rect="true"
@ -17,15 +17,15 @@
width="282">
<string
name="title_nearby">
NEARBY VOICE
Nearby voice
</string>
<string
name="title_group">
Group Call with [GROUP]
Group call with [GROUP]
</string>
<string
name="title_adhoc">
Conference Call
Conference call
</string>
<string
name="title_peer_2_peer">

View File

@ -12,7 +12,7 @@
save_rect="true"
save_visibility="true"
single_instance="true"
title="WORLD MAP"
title="World map"
width="650">
<panel
filename="panel_world_map.xml"

View File

@ -93,10 +93,10 @@
label=""
height="200"
width="330">
<string name="InboxLabelWithArg">Received Items ([NUM])</string>
<string name="InboxLabelNoArg">Received Items</string>
<string name="InboxLabelWithArg">Received items ([NUM])</string>
<string name="InboxLabelNoArg">Received items</string>
<button
label="Received Items"
label="Received items"
font="SansSerifMedium"
name="inbox_btn"
height="35"
@ -124,7 +124,7 @@
halign="right"
top_pad="0"
width="300">
[NUM] New
[NUM] new
</text>
<panel
follows="all"
@ -175,10 +175,10 @@
label=""
height="200"
width="330">
<string name="OutboxLabelWithArg">Merchant Outbox ([NUM])</string>
<string name="OutboxLabelNoArg">Merchant Outbox</string>
<string name="OutboxLabelWithArg">Merchant outbox ([NUM])</string>
<string name="OutboxLabelNoArg">Merchant outbox</string>
<button
label="Merchant Outbox"
label="Merchant outbox"
font="SansSerifMedium"
name="outbox_btn"
height="35"