summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-11-10 18:07:19 +0200
committerMike Antipov <mantipov@productengine.com>2009-11-10 18:07:19 +0200
commiteb05116e2b3339648a1458fd3be5c502583053ea (patch)
treebbdebaf6d814f2cabcff6c5f024374df16ded8dd
parent729df1aa330a50fa4f4b887e46c32a94a01880d7 (diff)
Work on major sub-task EXT-991 (Update bottom bar behavior on resize)
- update min width for chiclet panel - move showing of hidden buttons to place where resize strategy is determined --HG-- branch : product-engine
-rw-r--r--indra/newview/llbottomtray.cpp45
-rw-r--r--indra/newview/skins/default/xui/en/panel_bottomtray.xml6
2 files changed, 20 insertions, 31 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index b74b1d900b..c33d667e0b 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -320,21 +320,26 @@ void LLBottomTray::log(LLView* panel, const std::string& descr)
void LLBottomTray::verifyChildControlsSizes()
{
LLRect rect = mChicletPanel->getRect();
+ /*
if (rect.getWidth() < mChicletPanel->getMinWidth())
{
llwarns << "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ: chiclet panel less then min" << llendl;
mChicletPanel->reshape(mChicletPanel->getMinWidth(), rect.getHeight());
}
-
+*/
rect = mNearbyChatBar->getRect();
+/*
if (rect.getWidth() < mNearbyChatBar->getMinWidth())
{
llwarns << "WWWWWWWWWWWWWWWWWWWWWWWWWWWWW: near chat panel less then min" << llendl;
mNearbyChatBar->reshape(mNearbyChatBar->getMinWidth(), rect.getHeight());
}
else
+*/
if (rect.getWidth() > mNearbyChatBar->getMaxWidth())
{
+ llerrs << "WWWWWWWWWWWWWWWWWWWWWWWWWWWWW: near chat panel more then max width" << llendl;
+
rect.setLeftTopAndSize(rect.mLeft, rect.mTop, mNearbyChatBar->getMaxWidth(), rect.getHeight());
mNearbyChatBar->reshape(mNearbyChatBar->getMaxWidth(), rect.getHeight());
mNearbyChatBar->setRect(rect);
@@ -346,11 +351,12 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
static S32 depth = 0;
if (0 == depth) lldebugs << "****************************************" << llendl;
+ S32 prev_width = getRect().getWidth();
lldebugs << "Reshaping: depth: " << ++depth
<< ", width: " << width
<< ", height: " << height
<< ", called_from_parent: " << called_from_parent
- << ", cur width: " << getRect().getWidth()
+ << ", cur width: " << prev_width
<< ", cur height: " << getRect().getHeight()
<< llendl;
@@ -359,19 +365,8 @@ if (0 == depth) lldebugs << "****************************************" << llendl
if (mChicletPanel && mToolbarStack && mNearbyChatBar)
{
-// S32 delta_width = width - getRect().getWidth();
- BOOL shrink = width < getRect().getWidth();
-
-
-
verifyChildControlsSizes();
- updateResizeState(width, height);
- if (RS_NORESIZE == mResizeState && !called_from_parent)
- {
- // this can be in case nearby
- lldebugs << "width was not changed & !called_from_parent" << llendl;
-
- }
+ updateResizeState(width, prev_width);
if (RS_NORESIZE != mResizeState)
{
@@ -380,23 +375,11 @@ if (0 == depth) lldebugs << "****************************************" << llendl
mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE);
// mToolbarStack->updatePanelAutoResize(PANEL_CHATBAR_NAME, mResizeState & RS_CHATBAR_INPUT);
-
-
- bool show_button = !shrink;
- if (width != getRect().getWidth() && show_button)
- {
- if (mResizeState & RS_BUTTON_SNAPSHOT) showSnapshotButton(show_button);
- if (mResizeState & RS_BUTTON_CAMERA) showCameraButton(show_button);
- if (mResizeState & RS_BUTTON_MOVEMENT) showMoveButton(show_button);
- if (mResizeState & RS_BUTTON_GESTURES) showGestureButton(show_button);
- }
-
}
}
LLPanel::reshape(width, height, called_from_parent);
- // *TODO: проверить ширину nearby после ресайза на предмет выхода за максимальный предел
if (mNearbyChatBar) log(mNearbyChatBar, "after");
if (mChicletPanel) log(mChicletPanel, "after");
@@ -412,7 +395,7 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
LLPanel* compansative_view = mNearbyChatBar;
S32 compensative_delta_width = 0;
- S32 delta_width = width - getRect().getWidth();
+ S32 delta_width = width - height;
// if (delta_width == 0) return;
const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth();
@@ -431,7 +414,7 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
bool still_should_be_processed = true;
// bottom tray is narrowed
- if (width < getRect().getWidth())
+ if (width < height)
{
if (chiclet_panel_width > chiclet_panel_min_width)
{
@@ -579,6 +562,7 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
<< ", compensative_delta_width: " << compensative_delta_width
<< ", delta_width: " << delta_width
<< llendl;
+ showGestureButton(true);
}
if (available_width > 0 && processShowButton(mMovementPanel, &available_width))
@@ -591,6 +575,7 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
<< ", compensative_delta_width: " << compensative_delta_width
<< ", delta_width: " << delta_width
<< llendl;
+ showMoveButton(true);
}
if (available_width > 0 && processShowButton(mCamPanel, &available_width))
@@ -603,6 +588,7 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
<< ", compensative_delta_width: " << compensative_delta_width
<< ", delta_width: " << delta_width
<< llendl;
+ showCameraButton(true);
}
if (available_width > 0 && processShowButton(mSnapshotPanel, &available_width))
@@ -615,12 +601,13 @@ void LLBottomTray::updateResizeState(S32 width, S32 height)
<< ", compensative_delta_width: " << compensative_delta_width
<< ", delta_width: " << delta_width
<< llendl;
+ showSnapshotButton(true);
}
if (compensative_delta_width != 0)
{
S32 required_to_process_width = -compensative_delta_width;
- S32 total_delta_width = width - getRect().getWidth();
+ S32 total_delta_width = width - height;
// 1. use delta width of resizing
required_to_process_width -= total_delta_width;
diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
index 1c1065bc11..a945010d3e 100644
--- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml
@@ -224,16 +224,18 @@ bg_alpha_color="green"
top="0"
name="chiclet_list_panel"
width="189"
- min_width="189"
+ min_width="180"
user_resize="false"
auto_resize="true">
+<!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same
+as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. EXT-991-->
<chiclet_panel
mouse_opaque="false"
follows="left|right"
height="28"
layout="topleft"
left="0"
- min_width="129"
+ min_width="180"
name="chiclet_list"
top="0"
chiclet_padding="3"