summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-01-04 16:18:57 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-01-04 16:18:57 +0200
commit0508dab52393a02e9ace36441b3b755eb3617d08 (patch)
tree04af52385bef2cf306d490af6f0a630a6882cfd0 /indra
parent32657e37ab14e3ea4b5ff719e147fd720e895d77 (diff)
fixed EXT-3765 “There is no tongue for voice control panel in docked state”,
made dockable floaters have tongue by default; --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/llui/lldockablefloater.cpp9
-rw-r--r--indra/llui/lldockablefloater.h17
-rw-r--r--indra/llui/lldockcontrol.cpp12
-rw-r--r--indra/newview/llnearbychat.cpp2
4 files changed, 33 insertions, 7 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 6a5b475134..74438b184a 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -57,6 +57,7 @@ LLDockableFloater::LLDockableFloater(LLDockControl* dockControl,
, mOverlapsScreenChannel(false)
{
init(this);
+ mUseTongue = true;
}
LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
@@ -64,6 +65,14 @@ LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDock
LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(uniqueDocking)
{
init(this);
+ mUseTongue = true;
+}
+
+LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
+ bool useTongue, const LLSD& key, const Params& params) :
+ LLFloater(key, params), mDockControl(dockControl), mUseTongue(useTongue), mUniqueDocking(uniqueDocking)
+{
+ init(this);
}
LLDockableFloater::~LLDockableFloater()
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index ae4f99e205..2b1ce99ae2 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -62,6 +62,20 @@ public:
*/
LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
const LLSD& key, const Params& params = getDefaultParams());
+
+ /**
+ * Constructor.
+ * @param dockControl a pointer to the doc control instance
+ * @param uniqueDocking - a flag defines is docking should work as tab(at one
+ * moment only one docked floater can be shown).
+ * @praram useTongue - a flag defines is dock tongue should be used.
+ * @params key a floater key.
+ * @params params a floater parameters
+ */
+ LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
+ bool useTongue, const LLSD& key,
+ const Params& params = getDefaultParams());
+
virtual ~LLDockableFloater();
static LLHandle<LLFloater> getInstanceHandle() { return sInstanceHandle; }
@@ -104,6 +118,7 @@ public:
virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; }
bool getUniqueDocking() { return mUniqueDocking; }
+ bool getUseTongue() { return mUseTongue; }
private:
/**
* Provides unique of dockable floater.
@@ -125,6 +140,8 @@ private:
*/
bool mUniqueDocking;
+ bool mUseTongue;
+
bool mOverlapsScreenChannel;
};
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index 1c3c8449c5..0d8e54aa48 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -182,12 +182,12 @@ void LLDockControl::moveDockable()
LLRect rootRect;
mGetAllowedRectCallback(rootRect);
- bool unique_docking = false;
+ bool use_tongue = false;
LLDockableFloater* dockable_floater =
dynamic_cast<LLDockableFloater*> (mDockableFloater);
if (dockable_floater != NULL)
{
- unique_docking = dockable_floater->getUniqueDocking();
+ use_tongue = dockable_floater->getUseTongue();
}
LLRect dockableRect = mDockableFloater->calcScreenRect();
@@ -218,7 +218,7 @@ void LLDockControl::moveDockable()
x = dockRect.getCenterX() - dockableRect.getWidth() / 2;
y = dockRect.mTop + dockableRect.getHeight();
// unique docking used with dock tongue, so add tongue height o the Y coordinate
- if (unique_docking)
+ if (use_tongue)
{
y += mDockTongue->getHeight();
}
@@ -287,15 +287,15 @@ void LLDockControl::forceRecalculatePosition()
void LLDockControl::drawToungue()
{
- bool unique_docking = false;
+ bool use_tongue = false;
LLDockableFloater* dockable_floater =
dynamic_cast<LLDockableFloater*> (mDockableFloater);
if (dockable_floater != NULL)
{
- unique_docking = dockable_floater->getUniqueDocking();
+ use_tongue = dockable_floater->getUseTongue();
}
- if (mEnabled && unique_docking)
+ if (mEnabled && use_tongue)
{
mDockTongue->draw(mDockTongueX, mDockTongueY);
}
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 2ad82d3e8e..649c414569 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -63,7 +63,7 @@
static const S32 RESIZE_BAR_THICKNESS = 3;
LLNearbyChat::LLNearbyChat(const LLSD& key)
- : LLDockableFloater(NULL, false, key)
+ : LLDockableFloater(NULL, false, false, key)
,mChatHistory(NULL)
{