EXT-7536 FIXED (Favorites bar and Navigation bar looks similar to the mock-up)
- Added constant FAVBAR_TOP_PADDING in the LLNavigationBar which defines the distance between navigation panel and favorites panel in pixels. - Added new image NavBar_BG_NoFav_Bevel which is used to show navigation panel with favorites bar hidden. It is required to show navigation panel with bevel at the bottom. - Added new image NavBar_BG_NoNav_Bevel which is used to show favorites panel with navigation panel hidden. It is required to show favorites panel with bevel at the top. - Removed image NavBar_BG_NoFav. It is not used anymore. - Modified the methods showNavigationPanel and showFavoritesPanel to take into account that distance. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/664/ --HG-- branch : product-enginemeow-7.2.2
parent
38d54c0750
commit
3e7af3244f
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 231 B |
Binary file not shown.
|
After Width: | Height: | Size: 218 B |
|
|
@ -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" />
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue