summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-09-09 04:12:50 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-09-09 04:12:50 +0000
commit579d8447d3269fc6ed747774f1b612a88d850781 (patch)
treedb741511a681ae711aecb665b5be1eb6fdd4e062 /indra/llui
parentbc022a04605c1e0f3c08dfc75c6f49fc9def02c7 (diff)
merge merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1581 https://svn.aws.productengine.com/secondlife/pe/stable-2@1585 -> viewer-2.0.0-3
* Bugs: EXT-838 EXT-815 EXT-872 * New Dev: IM Floater Docking
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lldockablefloater.cpp25
-rw-r--r--indra/llui/lldockablefloater.h1
2 files changed, 20 insertions, 6 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index d0789d6502..5243f67a76 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -53,21 +53,34 @@ BOOL LLDockableFloater::postBuild()
void LLDockableFloater::setDocked(bool docked, bool pop_on_undock)
{
- if (docked)
+ if (mDockControl.get() != NULL)
{
- mDockControl.get()->on();
+ if (docked)
+ {
+ mDockControl.get()->on();
+ }
+ else
+ {
+ mDockControl.get()->off();
+ }
}
- else
+
+ if (!docked && pop_on_undock)
{
- mDockControl.get()->off();
+ // visually pop up a little bit to emphasize the undocking
+ translate(0, UNDOCK_LEAP_HEIGHT);
}
+
LLFloater::setDocked(docked, pop_on_undock);
}
void LLDockableFloater::draw()
{
- mDockControl.get()->repositionDockable();
- mDockControl.get()->drawToungue();
+ if (mDockControl.get() != NULL)
+ {
+ mDockControl.get()->repositionDockable();
+ mDockControl.get()->drawToungue();
+ }
LLFloater::draw();
}
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 5ece78a925..da86889c33 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -43,6 +43,7 @@
*/
class LLDockableFloater : public LLFloater
{
+ static const U32 UNDOCK_LEAP_HEIGHT = 12;
public:
LOG_CLASS(LLDockableFloater);
LLDockableFloater(LLDockControl* dockControl, const LLSD& key, const Params& params = getDefaultParams());