summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-02-27 01:03:39 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-02-27 01:03:39 +0000
commit647d29b1a2d4712ea738b408be43e56895a715b1 (patch)
tree8db33983be6e10c05895f9774bfbad81a3f6ae81 /indra/llui
parentc4b5b3977ffa6669a00f9bc334db02f51cc10fcb (diff)
merge -r 58285:58437 maintenance.
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llmenugl.cpp14
-rw-r--r--indra/llui/llmenugl.h1
-rw-r--r--indra/llui/llpanel.cpp14
-rw-r--r--indra/llui/llpanel.h1
4 files changed, 23 insertions, 7 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 9161ecb19f..4c40d99178 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -1635,7 +1635,7 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
{
BOOL branch_visible = mBranch->getVisible();
BOOL handled = mBranch->handleAcceleratorKey(key, mask);
- if (handled && !branch_visible)
+ if (handled && !branch_visible && getVisible())
{
// flash this menu entry because we triggered an invisible menu item
LLMenuHolderGL::setActivatedItem(this);
@@ -2263,6 +2263,12 @@ void LLMenuGL::setBackgroundColor( const LLColor4& color )
mBackgroundColor = color;
}
+LLColor4 LLMenuGL::getBackgroundColor()
+{
+ return mBackgroundColor;
+}
+
+
// rearrange the child rects so they fit the shape of the menu.
void LLMenuGL::arrange( void )
{
@@ -4159,6 +4165,7 @@ void LLMenuBarGL::arrange( void )
item->setRect( rect );
item->buildDrawLabel();
}
+ reshape(rect.mRight, rect.getHeight());
}
@@ -4376,7 +4383,7 @@ BOOL LLMenuHolderGL::hasVisibleMenu() const
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
LLView* viewp = *child_it;
- if (viewp->getVisible())
+ if (viewp->getVisible() && viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR)
{
return TRUE;
}
@@ -4402,7 +4409,8 @@ BOOL LLMenuHolderGL::hideMenus()
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
LLView* viewp = *child_it;
- if (viewp->getVisible())
+ // clicks off of menu do not hide menu bar
+ if (viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR && viewp->getVisible())
{
viewp->setVisible(FALSE);
}
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h
index 1b0b844bdc..e60f267702 100644
--- a/indra/llui/llmenugl.h
+++ b/indra/llui/llmenugl.h
@@ -424,6 +424,7 @@ public:
static void setDefaultBackgroundColor( const LLColor4& color );
void setBackgroundColor( const LLColor4& color );
+ LLColor4 getBackgroundColor();
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
void setCanTearOff(BOOL tear_off, LLViewHandle parent_floater_handle = LLViewHandle::sDeadHandle);
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index de65ce14f6..406b5ef571 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -164,10 +164,11 @@ void LLPanel::draw()
// draw background
if( mBgVisible )
{
- S32 left = LLPANEL_BORDER_WIDTH;
- S32 top = mRect.getHeight() - LLPANEL_BORDER_WIDTH;
- S32 right = mRect.getWidth() - LLPANEL_BORDER_WIDTH;
- S32 bottom = LLPANEL_BORDER_WIDTH;
+ //RN: I don't see the point of this
+ S32 left = 0;//LLPANEL_BORDER_WIDTH;
+ S32 top = mRect.getHeight();// - LLPANEL_BORDER_WIDTH;
+ S32 right = mRect.getWidth();// - LLPANEL_BORDER_WIDTH;
+ S32 bottom = 0;//LLPANEL_BORDER_WIDTH;
if (mBgOpaque )
{
@@ -459,6 +460,11 @@ void LLPanel::setBackgroundColor(const LLColor4& color)
mBgColorOpaque = color;
}
+LLColor4 LLPanel::getBackgroundColor()
+{
+ return mBgColorOpaque;
+}
+
void LLPanel::setTransparentColor(const LLColor4& color)
{
mBgColorAlpha = color;
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index 9da27b6f38..59922994c1 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -86,6 +86,7 @@ public:
static BOOL nextAlert(LLAlertInfo &alert);
void setBackgroundColor( const LLColor4& color );
+ LLColor4 getBackgroundColor();
void setTransparentColor(const LLColor4& color);
void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
void setBackgroundOpaque(BOOL b) { mBgOpaque = b; }