Skip to content
Snippets Groups Projects
Commit 0a1934f8 authored by richard's avatar richard
Browse files

Merge

parents 422f7fa0 318ae141
No related branches found
No related tags found
No related merge requests found
...@@ -330,31 +330,31 @@ BOOL LLBottomTray::postBuild() ...@@ -330,31 +330,31 @@ BOOL LLBottomTray::postBuild()
void LLBottomTray::log(LLView* panel, const std::string& descr) void LLBottomTray::log(LLView* panel, const std::string& descr)
{ {
if (NULL == panel) return; if (NULL == panel) return;
//LLView* layout = panel->getParent(); LLView* layout = panel->getParent();
//lldebugs << descr << ": " lldebugs << descr << ": "
// << "panel: " << panel->getName() << "panel: " << panel->getName()
// << ", rect: " << panel->getRect() << ", rect: " << panel->getRect()
//
//
// << "layout: " << layout->getName() << "layout: " << layout->getName()
// << ", rect: " << layout->getRect() << ", rect: " << layout->getRect()
// << llendl << llendl
// ; ;
} }
void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
{ {
static S32 debug_calling_number = 0; static S32 debug_calling_number = 0;
//lldebugs << "**************************************** " << ++debug_calling_number << llendl; lldebugs << "**************************************** " << ++debug_calling_number << llendl;
S32 current_width = getRect().getWidth(); S32 current_width = getRect().getWidth();
S32 delta_width = width - current_width; S32 delta_width = width - current_width;
//lldebugs << "Reshaping: " lldebugs << "Reshaping: "
// << ", width: " << width << ", width: " << width
// << ", cur width: " << current_width << ", cur width: " << current_width
// << ", delta_width: " << delta_width << ", delta_width: " << delta_width
// << ", called_from_parent: " << called_from_parent << ", called_from_parent: " << called_from_parent
// << llendl; << llendl;
if (mNearbyChatBar) log(mNearbyChatBar, "before"); if (mNearbyChatBar) log(mNearbyChatBar, "before");
if (mChicletPanel) log(mChicletPanel, "before"); if (mChicletPanel) log(mChicletPanel, "before");
...@@ -411,7 +411,7 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) ...@@ -411,7 +411,7 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent)
if (should_be_reshaped) if (should_be_reshaped)
{ {
//lldebugs << "Reshape all children with width: " << width << llendl; lldebugs << "Reshape all children with width: " << width << llendl;
LLPanel::reshape(width, height, called_from_parent); LLPanel::reshape(width, height, called_from_parent);
} }
...@@ -433,10 +433,10 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) ...@@ -433,10 +433,10 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
S32 delta_panel = llmin(-delta_width, panel_delta_min); S32 delta_panel = llmin(-delta_width, panel_delta_min);
//lldebugs << "delta_width: " << delta_width lldebugs << "delta_width: " << delta_width
// << ", panel_delta_min: " << panel_delta_min << ", panel_delta_min: " << panel_delta_min
// << ", delta_panel: " << delta_panel << ", delta_panel: " << delta_panel
// << llendl; << llendl;
// is chiclet panel width enough to process resizing? // is chiclet panel width enough to process resizing?
delta_width += panel_delta_min; delta_width += panel_delta_min;
...@@ -446,9 +446,9 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) ...@@ -446,9 +446,9 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight());
log(mChicletPanel, "after processing panel decreasing via chiclet panel"); log(mChicletPanel, "after processing panel decreasing via chiclet panel");
//lldebugs << "RS_CHICLET_PANEL" lldebugs << "RS_CHICLET_PANEL"
// << ", delta_width: " << delta_width << ", delta_width: " << delta_width
// << llendl; << llendl;
} }
const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth();
...@@ -469,10 +469,10 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) ...@@ -469,10 +469,10 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
log(mChicletPanel, "after processing panel decreasing via nearby chatbar panel"); log(mChicletPanel, "after processing panel decreasing via nearby chatbar panel");
//lldebugs << "RS_CHATBAR_INPUT" lldebugs << "RS_CHATBAR_INPUT"
// << ", delta_panel: " << delta_panel << ", delta_panel: " << delta_panel
// << ", delta_width: " << delta_width << ", delta_width: " << delta_width
// << llendl; << llendl;
} }
S32 extra_shrink_width = 0; S32 extra_shrink_width = 0;
...@@ -513,7 +513,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) ...@@ -513,7 +513,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width)
log(mNearbyChatBar, "before applying compensative width"); log(mNearbyChatBar, "before applying compensative width");
mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() ); mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() );
log(mNearbyChatBar, "after applying compensative width"); log(mNearbyChatBar, "after applying compensative width");
//lldebugs << buttons_freed_width << llendl; lldebugs << buttons_freed_width << llendl;
} }
} }
...@@ -537,11 +537,11 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) ...@@ -537,11 +537,11 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
// how many room we have to show hidden buttons // how many room we have to show hidden buttons
S32 total_available_width = delta_width + chatbar_available_shrink_width + available_width_chiclet; S32 total_available_width = delta_width + chatbar_available_shrink_width + available_width_chiclet;
//lldebugs << "Processing extending, available width:" lldebugs << "Processing extending, available width:"
// << ", chatbar - " << chatbar_available_shrink_width << ", chatbar - " << chatbar_available_shrink_width
// << ", chiclets - " << available_width_chiclet << ", chiclets - " << available_width_chiclet
// << ", total - " << total_available_width << ", total - " << total_available_width
// << llendl; << llendl;
S32 available_width = total_available_width; S32 available_width = total_available_width;
if (available_width > 0) if (available_width > 0)
...@@ -586,7 +586,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) ...@@ -586,7 +586,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
log(mNearbyChatBar, "increase width: before applying compensative width"); log(mNearbyChatBar, "increase width: before applying compensative width");
mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() ); mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() );
if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width"); if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width");
//lldebugs << chatbar_shrink_width << llendl; lldebugs << chatbar_shrink_width << llendl;
// 3. use width available via decreasing of chiclet panel // 3. use width available via decreasing of chiclet panel
required_to_process_width -= chatbar_shrink_width; required_to_process_width -= chatbar_shrink_width;
...@@ -595,7 +595,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) ...@@ -595,7 +595,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
{ {
mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_to_process_width, mChicletPanel->getParent()->getRect().getHeight()); mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - required_to_process_width, mChicletPanel->getParent()->getRect().getHeight());
log(mChicletPanel, "after applying compensative width for chiclets: "); log(mChicletPanel, "after applying compensative width for chiclets: ");
//lldebugs << required_to_process_width << llendl; lldebugs << required_to_process_width << llendl;
} }
} }
...@@ -610,10 +610,10 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) ...@@ -610,10 +610,10 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
{ {
S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_;
S32 delta_panel = llmin(delta_width, delta_panel_max); S32 delta_panel = llmin(delta_width, delta_panel_max);
//lldebugs << "Unprocesed delta width: " << delta_width lldebugs << "Unprocesed delta width: " << delta_width
// << ", can be applied to chatbar: " << delta_panel_max << ", can be applied to chatbar: " << delta_panel_max
// << ", will be applied: " << delta_panel << ", will be applied: " << delta_panel
// << llendl; << llendl;
delta_width -= delta_panel_max; delta_width -= delta_panel_max;
mNearbyChatBar->reshape(chatbar_panel_width_ + delta_panel, mNearbyChatBar->getRect().getHeight()); mNearbyChatBar->reshape(chatbar_panel_width_ + delta_panel, mNearbyChatBar->getRect().getHeight());
...@@ -623,12 +623,12 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) ...@@ -623,12 +623,12 @@ void LLBottomTray::processWidthIncreased(S32 delta_width)
bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* available_width) bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* available_width)
{ {
//lldebugs << "Trying to show object type: " << shown_object_type << llendl; lldebugs << "Trying to show object type: " << shown_object_type << llendl;
LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; LLPanel* panel = mStateProcessedObjectMap[shown_object_type];
if (NULL == panel) if (NULL == panel)
{ {
//lldebugs << "There is no object to process for state: " << shown_object_type << llendl; lldebugs << "There is no object to process for state: " << shown_object_type << llendl;
return false; return false;
} }
bool can_be_shown = canButtonBeShown(shown_object_type); bool can_be_shown = canButtonBeShown(shown_object_type);
...@@ -643,9 +643,9 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa ...@@ -643,9 +643,9 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa
setTrayButtonVisible(shown_object_type, true); setTrayButtonVisible(shown_object_type, true);
//lldebugs << "processed object type: " << shown_object_type lldebugs << "processed object type: " << shown_object_type
//<< ", rest available width: " << *available_width << ", rest available width: " << *available_width
//<< llendl; << llendl;
mResizeState &= ~shown_object_type; mResizeState &= ~shown_object_type;
} }
} }
...@@ -654,12 +654,12 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa ...@@ -654,12 +654,12 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa
void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width) void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width)
{ {
//lldebugs << "Trying to hide object type: " << processed_object_type << llendl; lldebugs << "Trying to hide object type: " << processed_object_type << llendl;
LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; LLPanel* panel = mStateProcessedObjectMap[processed_object_type];
if (NULL == panel) if (NULL == panel)
{ {
//lldebugs << "There is no object to process for state: " << processed_object_type << llendl; lldebugs << "There is no object to process for state: " << processed_object_type << llendl;
return; return;
} }
...@@ -676,9 +676,9 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re ...@@ -676,9 +676,9 @@ void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* re
mResizeState |= processed_object_type; mResizeState |= processed_object_type;
//lldebugs << "processing object type: " << processed_object_type lldebugs << "processing object type: " << processed_object_type
// << ", buttons_freed_width: " << *buttons_freed_width << ", buttons_freed_width: " << *buttons_freed_width
// << llendl; << llendl;
} }
} }
...@@ -702,7 +702,7 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ ...@@ -702,7 +702,7 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_
bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL); bool success = mToolbarStack->getPanelMinSize(panel_name, &panel_min_width, NULL);
if (!success) if (!success)
{ {
//lldebugs << "Panel was not found to get its min width: " << panel_name << llendl; lldebugs << "Panel was not found to get its min width: " << panel_name << llendl;
} }
else else
{ {
...@@ -722,10 +722,10 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ ...@@ -722,10 +722,10 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_
*buttons_freed_width += *required_width; *buttons_freed_width += *required_width;
} }
//lldebugs << "Shrunk panel: " << panel_name lldebugs << "Shrunk panel: " << panel_name
// << ", shrunk width: " << possible_shrink_width << ", shrunk width: " << possible_shrink_width
// << ", rest width to process: " << *required_width << ", rest width to process: " << *required_width
// << llendl; << llendl;
} }
} }
} }
...@@ -736,7 +736,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* ...@@ -736,7 +736,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32*
LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; LLPanel* panel = mStateProcessedObjectMap[processed_object_type];
if (NULL == panel) if (NULL == panel)
{ {
// lldebugs << "There is no object to process for type: " << processed_object_type << llendl; lldebugs << "There is no object to process for type: " << processed_object_type << llendl;
return; return;
} }
...@@ -750,7 +750,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* ...@@ -750,7 +750,7 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32*
if (!success) if (!success)
{ {
//lldebugs << "Panel was not found to get its min width: " << panel_name << llendl; lldebugs << "Panel was not found to get its min width: " << panel_name << llendl;
} }
// we have some space to free by shrinking the button // we have some space to free by shrinking the button
else if (possible_shrink_width > 0) else if (possible_shrink_width > 0)
...@@ -769,10 +769,10 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* ...@@ -769,10 +769,10 @@ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32*
} }
panel->reshape(panel_width - possible_shrink_width, panel->getRect().getHeight()); panel->reshape(panel_width - possible_shrink_width, panel->getRect().getHeight());
//lldebugs << "Shrunk panel: " << panel_name lldebugs << "Shrunk panel: " << panel_name
// << ", shrunk width: " << possible_shrink_width << ", shrunk width: " << possible_shrink_width
// << ", rest width to process: " << *required_width << ", rest width to process: " << *required_width
// << llendl; << llendl;
} }
} }
} }
...@@ -806,10 +806,10 @@ void LLBottomTray::processExtendButtons(S32* available_width) ...@@ -806,10 +806,10 @@ void LLBottomTray::processExtendButtons(S32* available_width)
*available_width -= possible_extend_width; *available_width -= possible_extend_width;
//lldebugs << "Extending panel: " << mSpeakPanel->getName() lldebugs << "Extending panel: " << mSpeakPanel->getName()
// << ", extended width: " << possible_extend_width << ", extended width: " << possible_extend_width
// << ", rest width to process: " << *available_width << ", rest width to process: " << *available_width
// << llendl; << llendl;
} }
} }
} }
...@@ -819,7 +819,7 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* ...@@ -819,7 +819,7 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32*
LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; LLPanel* panel = mStateProcessedObjectMap[processed_object_type];
if (NULL == panel) if (NULL == panel)
{ {
//lldebugs << "There is no object to process for type: " << processed_object_type << llendl; lldebugs << "There is no object to process for type: " << processed_object_type << llendl;
return; return;
} }
...@@ -845,10 +845,10 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* ...@@ -845,10 +845,10 @@ void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32*
} }
panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight()); panel->reshape(panel_width + possible_extend_width, panel->getRect().getHeight());
//lldebugs << "Extending panel: " << panel->getName() lldebugs << "Extending panel: " << panel->getName()
// << ", extended width: " << possible_extend_width << ", extended width: " << possible_extend_width
// << ", rest width to process: " << *available_width << ", rest width to process: " << *available_width
// << llendl; << llendl;
} }
} }
...@@ -894,7 +894,7 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis ...@@ -894,7 +894,7 @@ void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool vis
LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; LLPanel* panel = mStateProcessedObjectMap[shown_object_type];
if (NULL == panel) if (NULL == panel)
{ {
//lldebugs << "There is no object to show for state: " << shown_object_type << llendl; lldebugs << "There is no object to show for state: " << shown_object_type << llendl;
return; return;
} }
...@@ -910,7 +910,7 @@ void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type ...@@ -910,7 +910,7 @@ void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type
LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; LLPanel* panel = mStateProcessedObjectMap[shown_object_type];
if (NULL == panel) if (NULL == panel)
{ {
//lldebugs << "There is no object to process for state: " << shown_object_type << llendl; lldebugs << "There is no object to process for state: " << shown_object_type << llendl;
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment