summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-10-10 15:31:25 -0700
committerRichard Nelson <richard@lindenlab.com>2011-10-10 15:31:25 -0700
commit0526d673093b2279777dc8be5aae9cc33cb1c822 (patch)
tree5224ed6f178d237a8b5edf6ce20f7ddb06da4d5f
parentda3c7da7a585ea14a5a494ac7f36e7714bc86ab8 (diff)
EXP-1312 FIX Floaters should appear in region not covered by toolbars
moved floater snap region to middle of toolbars and constrained floaters to that snap region also made toybox floater pass all drag and drop events along to toolbar
-rw-r--r--indra/llui/llfloater.cpp2
-rw-r--r--indra/newview/llfloatertoybox.cpp11
-rw-r--r--indra/newview/llfloatertoybox.h5
-rw-r--r--indra/newview/skins/default/xui/en/main_view.xml7
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml7
5 files changed, 24 insertions, 8 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index cc49238a0b..cba14e21c3 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2549,7 +2549,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
}
// move window fully onscreen
- if (floater->translateIntoRect( getLocalRect(), allow_partial_outside ))
+ if (floater->translateIntoRect( getSnapRect(), allow_partial_outside ))
{
floater->clearSnapTarget();
}
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index 609041803a..fa60022911 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -120,5 +120,16 @@ void LLFloaterToybox::onBtnRestoreDefaults()
LLToolBarView::loadDefaultToolbars();
}
+BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg)
+{
+ S32 local_x = x - mToolBar->getRect().mLeft;
+ S32 local_y = y - mToolBar->getRect().mBottom;
+ return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+}
+
// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index f7245506c5..f0a6cf1a8b 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -43,6 +43,11 @@ public:
// virtuals
BOOL postBuild();
void draw();
+ /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
+ EDragAndDropType cargo_type,
+ void* cargo_data,
+ EAcceptance* accept,
+ std::string& tooltip_msg);
protected:
void onBtnRestoreDefaults();
diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml
index 57baa7cdd3..96d070ae50 100644
--- a/indra/newview/skins/default/xui/en/main_view.xml
+++ b/indra/newview/skins/default/xui/en/main_view.xml
@@ -74,13 +74,6 @@
user_resize="false"
name="hud container"
width="500">
- <view top="0"
- follows="all"
- height="500"
- left="0"
- mouse_opaque="false"
- name="floater_snap_region"
- width="500"/>
<panel follows="left|top"
height="19"
left="0"
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index 03d45887d4..bc96bfbab5 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -55,6 +55,13 @@
mouse_opaque="false"
height="100"
width="100">
+ <view top="0"
+ follows="all"
+ height="100"
+ left="0"
+ mouse_opaque="false"
+ name="floater_snap_region"
+ width="100"/>
<panel bottom="100"
follows="left|right|bottom"
height="25"