aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui')
-rw-r--r--linden/indra/llui/lllineeditor.cpp5
-rw-r--r--linden/indra/llui/llmenugl.cpp44
-rw-r--r--linden/indra/llui/llmenugl.h5
-rw-r--r--linden/indra/llui/lltexteditor.cpp4
4 files changed, 15 insertions, 43 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp
index c4f9525..5f16853 100644
--- a/linden/indra/llui/lllineeditor.cpp
+++ b/linden/indra/llui/lllineeditor.cpp
@@ -223,18 +223,15 @@ LLLineEditor::LLLineEditor(const std::string& name, const LLRect& rect,
223 } 223 }
224 mImage = sImage; 224 mImage = sImage;
225 225
226
227 LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); 226 LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this);
228 if (!menu) 227 if (!menu)
229 { 228 {
230 menu = new LLMenuGL(LLStringUtil::null); 229 menu = new LLMenuGL(LLStringUtil::null);
231 } 230 }
232 231
233 defineMenuCallbacks(menu); 232 defineMenuCallbacks(menu);
234 mPopupMenuHandle = menu->getHandle(); 233 mPopupMenuHandle = menu->getHandle();
235 menu->setBorderColor(gColors.getColor("MenuItemDisabledColor"));
236 menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); 234 menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
237
238} 235}
239 236
240 237
diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp
index d5e1186..2d4a2f1 100644
--- a/linden/indra/llui/llmenugl.cpp
+++ b/linden/indra/llui/llmenugl.cpp
@@ -3099,8 +3099,7 @@ void LLMenuGL::draw( void )
3099 3099
3100 if( mBgVisible ) 3100 if( mBgVisible )
3101 { 3101 {
3102 gl_rect_2d( -1, getRect().getHeight()+2, getRect().getWidth()+2, -2, mBorderColor,FALSE); 3102 gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor );
3103 gl_rect_2d( 0, getRect().getHeight(), getRect().getWidth(), 0, mBackgroundColor );
3104 } 3103 }
3105 LLView::draw(); 3104 LLView::draw();
3106} 3105}
@@ -3157,37 +3156,18 @@ LLMenuGL* LLMenuGL::getChildMenuByName(const std::string& name, BOOL recurse) co
3157} 3156}
3158 3157
3159 3158
3160void LLMenuGL::setBackgroundColor( const LLColor4& color ) { 3159void LLMenuGL::setBackgroundColor( const LLColor4& color )
3161 3160{
3162 mBackgroundColor = color; 3161 mBackgroundColor = color;
3163 item_list_t::iterator item_iter; 3162 item_list_t::iterator item_iter;
3164 for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter) 3163 for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
3165 {
3166 if((*item_iter)->getType()=="menu")
3167 {
3168 LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter);
3169 menuBranchItem->getBranch()->setBackgroundColor(color);
3170 }
3171 }
3172
3173
3174}
3175
3176
3177void LLMenuGL::setBorderColor( const LLColor4& color ) {
3178
3179 mBorderColor = color;
3180 item_list_t::iterator item_iter;
3181 for (item_iter = mItems.begin(); item_iter != mItems.end(); ++item_iter)
3182 { 3164 {
3183 if((*item_iter)->getType()=="menu") 3165 if((*item_iter)->getType()=="menu")
3184 { 3166 {
3185 LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter); 3167 LLMenuItemBranchGL *menuBranchItem = (LLMenuItemBranchGL*)(*item_iter);
3186 menuBranchItem->getBranch()->setBorderColor(color); 3168 menuBranchItem->getBranch()->setBackgroundColor(color);
3187 } 3169 }
3188 } 3170 }
3189
3190
3191} 3171}
3192 3172
3193 3173
diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h
index 9a9d1b0..3b57a32 100644
--- a/linden/indra/llui/llmenugl.h
+++ b/linden/indra/llui/llmenugl.h
@@ -514,10 +514,8 @@ public:
514 514
515 // background colors 515 // background colors
516 static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; } 516 static void setDefaultBackgroundColor( const LLColor4& color ) { sDefaultBackgroundColor = color; }
517 void setBackgroundColor( const LLColor4& color ); 517 void setBackgroundColor( const LLColor4& color );
518 void setBorderColor( const LLColor4& color );
519 const LLColor4& getBackgroundColor() const { return mBackgroundColor; } 518 const LLColor4& getBackgroundColor() const { return mBackgroundColor; }
520 const LLColor4& getBorderColor() const { return mBorderColor; }
521 void setBackgroundVisible( BOOL b ) { mBgVisible = b; } 519 void setBackgroundVisible( BOOL b ) { mBgVisible = b; }
522 void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>()); 520 void setCanTearOff(BOOL tear_off, LLHandle<LLFloater> parent_floater_handle = LLHandle<LLFloater>());
523 521
@@ -631,7 +629,6 @@ private:
631 static BOOL sKeyboardMode; 629 static BOOL sKeyboardMode;
632 630
633 LLColor4 mBackgroundColor; 631 LLColor4 mBackgroundColor;
634 LLColor4 mBorderColor;
635 BOOL mBgVisible; 632 BOOL mBgVisible;
636 LLMenuItemGL* mParentMenuItem; 633 LLMenuItemGL* mParentMenuItem;
637 LLUIString mLabel; 634 LLUIString mLabel;
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 79966c2..de05872 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -389,14 +389,12 @@ LLTextEditor::LLTextEditor(
389 LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this); 389 LLMenuGL* menu = LLUICtrlFactory::getInstance()->buildMenu("menu_rightclick_text.xml",this);
390 if (!menu) 390 if (!menu)
391 { 391 {
392 menu = new LLMenuGL(LLStringUtil::null); 392 menu = new LLMenuGL(LLStringUtil::null);
393 } 393 }
394 394
395 defineMenuCallbacks(menu); 395 defineMenuCallbacks(menu);
396 mPopupMenuHandle = menu->getHandle(); 396 mPopupMenuHandle = menu->getHandle();
397 menu->setBorderColor(gColors.getColor("MenuItemDisabledColor"));
398 menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor")); 397 menu->setBackgroundColor(gColors.getColor("MenuPopupBgColor"));
399
400} 398}
401 399
402LLTextEditor::~LLTextEditor() 400LLTextEditor::~LLTextEditor()