Skip to content
Snippets Groups Projects
Commit 0526d673 authored by Richard Nelson's avatar Richard Nelson
Browse files

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
parent da3c7da7
No related branches found
No related tags found
No related merge requests found
...@@ -2549,7 +2549,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out ...@@ -2549,7 +2549,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
} }
// move window fully onscreen // move window fully onscreen
if (floater->translateIntoRect( getLocalRect(), allow_partial_outside )) if (floater->translateIntoRect( getSnapRect(), allow_partial_outside ))
{ {
floater->clearSnapTarget(); floater->clearSnapTarget();
} }
......
...@@ -120,5 +120,16 @@ void LLFloaterToybox::onBtnRestoreDefaults() ...@@ -120,5 +120,16 @@ void LLFloaterToybox::onBtnRestoreDefaults()
LLToolBarView::loadDefaultToolbars(); 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 // eof
...@@ -43,6 +43,11 @@ class LLFloaterToybox : public LLFloater ...@@ -43,6 +43,11 @@ class LLFloaterToybox : public LLFloater
// virtuals // virtuals
BOOL postBuild(); BOOL postBuild();
void draw(); 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: protected:
void onBtnRestoreDefaults(); void onBtnRestoreDefaults();
......
...@@ -74,13 +74,6 @@ ...@@ -74,13 +74,6 @@
user_resize="false" user_resize="false"
name="hud container" name="hud container"
width="500"> width="500">
<view top="0"
follows="all"
height="500"
left="0"
mouse_opaque="false"
name="floater_snap_region"
width="500"/>
<panel follows="left|top" <panel follows="left|top"
height="19" height="19"
left="0" left="0"
......
...@@ -55,6 +55,13 @@ ...@@ -55,6 +55,13 @@
mouse_opaque="false" mouse_opaque="false"
height="100" height="100"
width="100"> width="100">
<view top="0"
follows="all"
height="100"
left="0"
mouse_opaque="false"
name="floater_snap_region"
width="100"/>
<panel bottom="100" <panel bottom="100"
follows="left|right|bottom" follows="left|right|bottom"
height="25" height="25"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment