summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llnavigationbar.cpp29
-rw-r--r--indra/newview/llnavigationbar.h2
-rw-r--r--indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.pngbin0 -> 231 bytes
-rw-r--r--indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.pngbin0 -> 218 bytes
-rw-r--r--indra/newview/skins/default/textures/textures.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_navigation_bar.xml17
6 files changed, 36 insertions, 16 deletions
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index fce666c9d4..67295179b2 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -776,7 +776,7 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
{
// Navigation Panel must be shown. Favorites Panel is hidden.
- S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight();
+ S32 height = mDefaultNbRect.getHeight() - mDefaultFpRect.getHeight() - FAVBAR_TOP_PADDING;
nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), height);
reshape(nbRect.getWidth(), nbRect.getHeight());
@@ -790,8 +790,11 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
{
// Navigation Panel must be hidden. Favorites Panel is visible.
- nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fbRect.getHeight());
- fbRect.setLeftTopAndSize(fbRect.mLeft, fbRect.getHeight(), fbRect.getWidth(), fbRect.getHeight());
+ S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
+ S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
+
+ nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
+ fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
// this is duplicated in 'else' section because it should be called BEFORE fb->reshape
reshape(nbRect.getWidth(), nbRect.getHeight());
@@ -813,8 +816,9 @@ void LLNavigationBar::showNavigationPanel(BOOL visible)
}
}
- childSetVisible("bg_icon", fpVisible);
- childSetVisible("bg_icon_no_fav", !fpVisible);
+ childSetVisible("bg_icon", visible && fpVisible);
+ childSetVisible("bg_icon_no_fav_bevel", visible && !fpVisible);
+ childSetVisible("bg_icon_no_nav_bevel", !visible && fpVisible);
}
void LLNavigationBar::showFavoritesPanel(BOOL visible)
@@ -833,7 +837,7 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
// Favorites Panel must be shown. Navigation Panel is visible.
S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() + fbHeight;
+ S32 newHeight = nbRect.getHeight() + fbHeight + FAVBAR_TOP_PADDING;
nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
fbRect.setLeftTopAndSize(mDefaultFpRect.mLeft, mDefaultFpRect.mTop, fbRect.getWidth(), fbRect.getHeight());
@@ -842,9 +846,11 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
{
// Favorites Panel must be shown. Navigation Panel is hidden.
- S32 fpHeight = mDefaultFpRect.getHeight();
+ S32 fpHeight = mDefaultFpRect.getHeight() + FAVBAR_TOP_PADDING;
+ S32 fpTop = fpHeight - (mDefaultFpRect.getHeight() / 2) + 1;
+
nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), fpHeight);
- fbRect.setLeftTopAndSize(fbRect.mLeft, fpHeight, fbRect.getWidth(), fpHeight);
+ fbRect.setLeftTopAndSize(fbRect.mLeft, fpTop, fbRect.getWidth(), mDefaultFpRect.getHeight());
}
reshape(nbRect.getWidth(), nbRect.getHeight());
@@ -861,7 +867,7 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
// Favorites Panel must be hidden. Navigation Panel is visible.
S32 fbHeight = fbRect.getHeight();
- S32 newHeight = nbRect.getHeight() - fbHeight;
+ S32 newHeight = nbRect.getHeight() - fbHeight - FAVBAR_TOP_PADDING;
nbRect.setLeftTopAndSize(nbRect.mLeft, nbRect.mTop, nbRect.getWidth(), newHeight);
}
@@ -877,8 +883,9 @@ void LLNavigationBar::showFavoritesPanel(BOOL visible)
getParent()->reshape(nbRect.getWidth(), nbRect.getHeight());
}
- childSetVisible("bg_icon", visible);
- childSetVisible("bg_icon_no_fav", !visible);
+ childSetVisible("bg_icon", npVisible && visible);
+ childSetVisible("bg_icon_no_fav_bevel", npVisible && !visible);
+ childSetVisible("bg_icon_no_nav_bevel", !npVisible && visible);
fb->setVisible(visible);
}
diff --git a/indra/newview/llnavigationbar.h b/indra/newview/llnavigationbar.h
index 03f17af09b..d21d86456e 100644
--- a/indra/newview/llnavigationbar.h
+++ b/indra/newview/llnavigationbar.h
@@ -111,6 +111,8 @@ public:
int getDefFavBarHeight();
private:
+ // the distance between navigation panel and favorites panel in pixels
+ const static S32 FAVBAR_TOP_PADDING = 10;
void rebuildTeleportHistoryMenu();
void showTeleportHistoryMenu(LLUICtrl* btn_ctrl);
diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png
new file mode 100644
index 0000000000..a79d999932
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoFav_Bevel.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png
new file mode 100644
index 0000000000..b692ed92da
--- /dev/null
+++ b/indra/newview/skins/default/textures/navbar/NavBar_BG_NoNav_Bevel.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 40e882757f..082b37d80b 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -276,9 +276,9 @@ with the same filename but different name
<texture name="Movement_Up_Off" file_name="bottomtray/Movement_Up_Off.png" preload="false" />
<texture name="Movement_Up_On" file_name="bottomtray/Movement_Up_On.png" preload="false" />
- <texture name="NavBar_BG_NoFav" file_name="navbar/NavBar_BG_NoFav.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
<texture name="NavBar_BG" file_name="navbar/NavBar_BG.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
-
+ <texture name="NavBar_BG_NoFav_Bevel" file_name="navbar/NavBar_BG_NoFav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
+ <texture name="NavBar_BG_NoNav_Bevel" file_name="navbar/NavBar_BG_NoNav_Bevel.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" />
<texture name="Notices_Unread" file_name="bottomtray/Notices_Unread.png" preload="true" />
diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
index 00b1fdd843..2c9d7e4b6a 100644
--- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml
@@ -22,14 +22,25 @@
width="600"/>
<icon
follows="all"
- image_name="NavBar_BG_NoFav"
+ image_name="NavBar_BG_NoFav_Bevel"
mouse_opaque="false"
- name="bg_icon_no_fav"
+ name="bg_icon_no_fav_bevel"
scale_image="true"
visible="false"
left="0"
top="0"
- height="50"
+ height="60"
+ width="600"/>
+ <icon
+ follows="all"
+ image_name="NavBar_BG_NoNav_Bevel"
+ mouse_opaque="false"
+ name="bg_icon_no_nav_bevel"
+ scale_image="true"
+ visible="false"
+ left="0"
+ top="0"
+ height="60"
width="600"/>
<panel
background_visible="false"