aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-05-27 21:50:01 -0700
committerJacek Antonelli2011-06-02 23:01:00 -0500
commit154cee6b4aab7c9723552212f5679d3c10fc1e90 (patch)
tree3a45da5e6af54f648b4ae951c99979207bfb08d1 /linden
parentFixed #875 by removing menu border introduced in 84ba6c13 (diff)
downloadmeta-impy-154cee6b4aab7c9723552212f5679d3c10fc1e90.zip
meta-impy-154cee6b4aab7c9723552212f5679d3c10fc1e90.tar.gz
meta-impy-154cee6b4aab7c9723552212f5679d3c10fc1e90.tar.bz2
meta-impy-154cee6b4aab7c9723552212f5679d3c10fc1e90.tar.xz
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)
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llviewermenu.cpp17
-rw-r--r--linden/indra/newview/llviewerwindow.cpp12
-rw-r--r--linden/indra/newview/skins/default/colors_base.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_login.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml2
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()
651 color = gColors.getColor( "MenuPopupBgColor" ); 651 color = gColors.getColor( "MenuPopupBgColor" );
652 gPopupMenuView->setBackgroundColor( color ); 652 gPopupMenuView->setBackgroundColor( color );
653 653
654 // If we are not in production, use a different color to make it apparent.
655 if (LLViewerLogin::getInstance()->isInProductionGrid())
656 {
657 color = gColors.getColor( "MenuBarBgColor" );
658 }
659 else
660 {
661 color = gColors.getColor( "MenuNonProductionBgColor" );
662 }
663 gMenuBarView = (LLMenuBarGL*)LLUICtrlFactory::getInstance()->buildMenu("menu_viewer.xml", gMenuHolder); 654 gMenuBarView = (LLMenuBarGL*)LLUICtrlFactory::getInstance()->buildMenu("menu_viewer.xml", gMenuHolder);
664 gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); 655 gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT));
665
666 // main menu colors
667 gMenuBarView->setBackgroundColor(color);
668 656
669 // gMenuBarView->setItemVisible("Tools", FALSE); 657 // gMenuBarView->setItemVisible("Tools", FALSE);
670 gMenuBarView->arrange(); 658 gMenuBarView->arrange();
@@ -675,8 +663,7 @@ void init_menus()
675 // flash when an item is triggered (the flash occurs in the holder) 663 // flash when an item is triggered (the flash occurs in the holder)
676 gViewerWindow->getRootView()->addChild(gMenuHolder); 664 gViewerWindow->getRootView()->addChild(gMenuHolder);
677 665
678 gViewerWindow->setMenuBackgroundColor(false, 666 gViewerWindow->setMenuBackgroundColor(false, LLViewerLogin::getInstance()->isInProductionGrid());
679 LLViewerLogin::getInstance()->isInProductionGrid());
680 667
681 // Assume L$10 for now, the server will tell us the real cost at login 668 // Assume L$10 for now, the server will tell us the real cost at login
682 std::string fee = gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + "10"; 669 std::string fee = gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + "10";
@@ -725,8 +712,6 @@ void init_menus()
725 LLRect menuBarRect = gLoginMenuBarView->getRect(); 712 LLRect menuBarRect = gLoginMenuBarView->getRect();
726 gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); 713 gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom));
727 714
728 gLoginMenuBarView->setBackgroundColor( color );
729
730 gMenuHolder->addChild(gLoginMenuBarView); 715 gMenuHolder->addChild(gLoginMenuBarView);
731} 716}
732 717
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)
2025 LLSD args; 2025 LLSD args;
2026 LLColor4 new_bg_color; 2026 LLColor4 new_bg_color;
2027 2027
2028 if(god_mode && LLViewerLogin::getInstance()->isInProductionGrid()) 2028 if (god_mode && dev_grid)
2029 { 2029 {
2030 new_bg_color = gColors.getColor( "MenuBarGodBgColor" ); 2030 new_bg_color = gColors.getColor( "MenuBarGodBgColor" );
2031 } 2031 }
2032 else if(god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) 2032 else if(god_mode && !dev_grid)
2033 { 2033 {
2034 new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" ); 2034 new_bg_color = gColors.getColor( "MenuNonProductionGodBgColor" );
2035 } 2035 }
2036 else if(!god_mode && !LLViewerLogin::getInstance()->isInProductionGrid()) 2036 else if(!god_mode && !dev_grid)
2037 { 2037 {
2038 new_bg_color = gColors.getColor( "MenuNonProductionBgColor" ); 2038 new_bg_color = gColors.getColor( "MenuNonProductionBgColor" );
2039 } 2039 }
@@ -2042,10 +2042,12 @@ void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
2042 new_bg_color = gColors.getColor( "MenuBarBgColor" ); 2042 new_bg_color = gColors.getColor( "MenuBarBgColor" );
2043 } 2043 }
2044 2044
2045 if(gMenuBarView) 2045 // Not doing this is a cheap workaround for the menu not having a good way to tell
2046 // the difference between bar and item color -- MC
2047 /*if(gMenuBarView)
2046 { 2048 {
2047 gMenuBarView->setBackgroundColor( new_bg_color ); 2049 gMenuBarView->setBackgroundColor( new_bg_color );
2048 } 2050 }*/
2049 2051
2050 if(gStatusBar) 2052 if(gStatusBar)
2051 { 2053 {
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 @@
85<ScrollReadOnlyColor value="100, 100, 100, 255" /> <!-- Color for inactive but not disabled lists --> 85<ScrollReadOnlyColor value="100, 100, 100, 255" /> <!-- Color for inactive but not disabled lists -->
86 86
87<!-- MENUS --> 87<!-- MENUS -->
88<MenuBarBgColor value="0, 0, 0, 255" /> <!-- Menu bar background --> 88<MenuBarBgColor value="62, 62, 62, 255" /> <!-- Menu bar background -->
89<MenuBarGodBgColor value="62, 128, 62, 255" /> <!-- Menu bar background with God Mode enabled --> 89<MenuBarGodBgColor value="62, 128, 62, 255" /> <!-- Menu bar background with God Mode enabled -->
90<MenuNonProductionGodBgColor value="0, 128, 0, 255" /> <!-- Beta viewer menu bar background --> 90<MenuNonProductionGodBgColor value="0, 128, 0, 255" /> <!-- Beta viewer menu bar background -->
91<MenuNonProductionBgColor value="128, 0, 0, 255" /> <!-- Beta viewer menu bar background with God Mode enabled --> 91<MenuNonProductionBgColor value="128, 0, 0, 255" /> <!-- Beta viewer menu bar background with God Mode enabled -->
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 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<menu_bar name="Login Menu" opaque="true" tear_off="false" height="18" bottom="-18" follows="left|top|right"> 2<menu_bar name="Login Menu" opaque="true" tear_off="false"
3 mouse_opaque="false"
4 drop_shadow="false"
5 height="18" bottom="-18" follows="left|top|right">
3 <menu create_jump_keys="true" label="File" name="File" opaque="true" tear_off="false" 6 <menu create_jump_keys="true" label="File" name="File" opaque="true" tear_off="false"
4 drop_shadow="true" mouse_opaque="false"> 7 drop_shadow="true" mouse_opaque="false">
5 <menu_item_call label="Quit" name="Quit" shortcut="control|Q"> 8 <menu_item_call label="Quit" name="Quit" shortcut="control|Q">
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 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?> 1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2 2
3<menu_bar name="Main Menu" drop_shadow="false" follows="left|top|right" 3<menu_bar name="Main Menu" drop_shadow="false" follows="left|top|right"
4 opaque="false" tear_off="false"> 4 opaque="false" mouse_opaque="false" tear_off="false">
5 5
6 6
7 <!-- FILE --> 7 <!-- FILE -->