summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSergey Borushevsky <sborushevsky@productengine.com>2009-10-26 21:18:49 +0200
committerSergey Borushevsky <sborushevsky@productengine.com>2009-10-26 21:18:49 +0200
commitee398188f037b0aff83e0e81e56cf2143044c886 (patch)
treec75cbd55a193e9159c3abd887a9599db8a9ad7be /indra
parent33c1be212afb3cf36a80c1fadb6aa9e55670c8ff (diff)
parentbdddca899b3967a614000b814cf98796c7a371a8 (diff)
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnearbychatbar.cpp26
-rw-r--r--indra/newview/llnearbychatbar.h3
2 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 5fa97926a5..217007fb15 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -45,6 +45,7 @@
#include "llviewerstats.h"
#include "llcommandhandler.h"
#include "llviewercontrol.h"
+#include "llnavigationbar.h"
S32 LLNearbyChatBar::sLastSpecialChatChannel = 0;
@@ -177,6 +178,31 @@ void LLGestureComboBox::draw()
LLComboBox::draw();
}
+//virtual
+void LLGestureComboBox::showList()
+{
+ LLComboBox::showList();
+
+ // Calculating amount of space between the navigation bar and gestures combo
+ LLNavigationBar* nb = LLNavigationBar::getInstance();
+ S32 x, nb_bottom;
+ nb->localPointToScreen(0, 0, &x, &nb_bottom);
+
+ S32 list_bottom;
+ mList->localPointToScreen(0, 0, &x, &list_bottom);
+
+ S32 max_height = nb_bottom - list_bottom;
+
+ LLRect rect = mList->getRect();
+ // List overlapped navigation bar, downsize it
+ if (rect.getHeight() > max_height)
+ {
+ rect.setOriginAndSize(rect.mLeft, rect.mBottom, rect.getWidth(), max_height);
+ mList->setRect(rect);
+ mList->reshape(rect.getWidth(), rect.getHeight());
+ }
+}
+
LLNearbyChatBar::LLNearbyChatBar()
: LLPanel()
, mChatBox(NULL)
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index b902ff86cc..d495a10193 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -62,6 +62,9 @@ public:
virtual void changed() { refreshGestures(); }
protected:
+
+ virtual void showList();
+
LLFrameTimer mGestureLabelTimer;
std::vector<LLMultiGesture*> mGestures;
std::string mLabel;