From 154cee6b4aab7c9723552212f5679d3c10fc1e90 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 27 May 2011 21:50:01 -0700 Subject: Fixing the menu to actually use its color options reveals how broken the whole system is. In this case, fixing the viewer menu color breaks the login menu bar. Seems like a better breakage alternative for the beta, though (cherry picked from commit 084bd7a120e9ac122e4356246a1da57fd8f1204e) --- linden/indra/newview/llviewermenu.cpp | 17 +---------------- linden/indra/newview/llviewerwindow.cpp | 12 +++++++----- linden/indra/newview/skins/default/colors_base.xml | 2 +- .../newview/skins/default/xui/en-us/menu_login.xml | 5 ++++- .../newview/skins/default/xui/en-us/menu_viewer.xml | 2 +- 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 1fe2dde..ac16dbc 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -651,20 +651,8 @@ void init_menus() color = gColors.getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); - // If we are not in production, use a different color to make it apparent. - if (LLViewerLogin::getInstance()->isInProductionGrid()) - { - color = gColors.getColor( "MenuBarBgColor" ); - } - else - { - color = gColors.getColor( "MenuNonProductionBgColor" ); - } gMenuBarView = (LLMenuBarGL*)LLUICtrlFactory::getInstance()->buildMenu("menu_viewer.xml", gMenuHolder); gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); - - // main menu colors - gMenuBarView->setBackgroundColor(color); // gMenuBarView->setItemVisible("Tools", FALSE); gMenuBarView->arrange(); @@ -675,8 +663,7 @@ void init_menus() // flash when an item is triggered (the flash occurs in the holder) gViewerWindow->getRootView()->addChild(gMenuHolder); - gViewerWindow->setMenuBackgroundColor(false, - LLViewerLogin::getInstance()->isInProductionGrid()); + gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid()); // Assume L$10 for now, the server will tell us the real cost at login std::string fee = gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + "10"; @@ -725,8 +712,6 @@ void init_menus() LLRect menuBarRect = gLoginMenuBarView->getRect(); gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); - gLoginMenuBarView->setBackgroundColor( color ); - gMenuHolder->addChild(gLoginMenuBarView); } diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index c4d5e58..2d20f63 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp @@ -2025,15 +2025,15 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) LLSD args; LLColor4 new_bg_color; - if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) + if (god_mode && dev_grid) { new_bg_color = gColors.getColor( "MenuBarGodBgColor" ); } - else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(god_mode && !dev_grid) { new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" ); } - else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) + else if(!god_mode && !dev_grid) { new_bg_color = gColors.getColor( "MenuNonProductionBgColor" ); } @@ -2042,10 +2042,12 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid) new_bg_color = gColors.getColor( "MenuBarBgColor" ); } - if(gMenuBarView) + // Not doing this is a cheap workaround for the menu not having a good way to tell + // the difference between bar and item color -- MC + /*if(gMenuBarView) { gMenuBarView->setBackgroundColor( new_bg_color ); - } + }*/ if(gStatusBar) { diff --git a/linden/indra/newview/skins/default/colors_base.xml b/linden/indra/newview/skins/default/colors_base.xml index 63ca3e0..b90f8aa 100644 --- a/linden/indra/newview/skins/default/colors_base.xml +++ b/linden/indra/newview/skins/default/colors_base.xml @@ -85,7 +85,7 @@ - + diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml index d17fad5..4582f4e 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_login.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_login.xml @@ -1,5 +1,8 @@ - + diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 0ebbf74..df1cdf2 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1,7 +1,7 @@ + opaque="false" mouse_opaque="false" tear_off="false"> -- cgit v1.1