diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-26 12:04:55 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-26 12:04:55 +0200 |
commit | 5383fb70c3a3b4abd1262825a5323cce5fb1a1e0 (patch) | |
tree | 541bf23470c70eac48d8be554d3577cb43a0477a /indra/llui/lldockcontrol.cpp | |
parent | bed1ec4525f0bcfe634c4677feb29dbbdc3442c8 (diff) |
Implemented EXT-1627 “Nearby Chat window behavior needs clarification”,
made non-unique docked floaters docks without dock tongue;
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/lldockcontrol.cpp')
-rw-r--r-- | indra/llui/lldockcontrol.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp index 456a2925a3..1c3c8449c5 100644 --- a/indra/llui/lldockcontrol.cpp +++ b/indra/llui/lldockcontrol.cpp @@ -182,6 +182,14 @@ void LLDockControl::moveDockable() LLRect rootRect; mGetAllowedRectCallback(rootRect); + bool unique_docking = false; + LLDockableFloater* dockable_floater = + dynamic_cast<LLDockableFloater*> (mDockableFloater); + if (dockable_floater != NULL) + { + unique_docking = dockable_floater->getUniqueDocking(); + } + LLRect dockableRect = mDockableFloater->calcScreenRect(); S32 x = 0; S32 y = 0; @@ -208,7 +216,13 @@ void LLDockControl::moveDockable() case TOP: x = dockRect.getCenterX() - dockableRect.getWidth() / 2; - y = dockRect.mTop + mDockTongue->getHeight() + dockableRect.getHeight(); + y = dockRect.mTop + dockableRect.getHeight(); + // unique docking used with dock tongue, so add tongue height o the Y coordinate + if (unique_docking) + { + y += mDockTongue->getHeight(); + } + // check is dockable inside root view rect if (x < rootRect.mLeft) { @@ -273,7 +287,15 @@ void LLDockControl::forceRecalculatePosition() void LLDockControl::drawToungue() { - if (mEnabled) + bool unique_docking = false; + LLDockableFloater* dockable_floater = + dynamic_cast<LLDockableFloater*> (mDockableFloater); + if (dockable_floater != NULL) + { + unique_docking = dockable_floater->getUniqueDocking(); + } + + if (mEnabled && unique_docking) { mDockTongue->draw(mDockTongueX, mDockTongueY); } |