From 0b8be887de8e801aa1f4bb1dc1d94c1ac5fd58ef Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 19 Feb 2010 19:51:07 +0200 Subject: Fixed low bug EXT-5568 (The Speak button label hides after bottom tray width decreased.) --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 92031be8c5..17313fc113 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -926,13 +926,12 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ } else { - // - mSpeakBtn->setLabelVisible(false); S32 panel_width = mSpeakPanel->getRect().getWidth(); S32 possible_shrink_width = panel_width - panel_min_width; if (possible_shrink_width > 0) { + mSpeakBtn->setLabelVisible(false); mSpeakPanel->reshape(panel_width - possible_shrink_width, mSpeakPanel->getRect().getHeight()); *required_width += possible_shrink_width; @@ -1007,11 +1006,11 @@ void LLBottomTray::processExtendButtons(S32* available_width) if (*available_width > 0) { - processExtendButton(RS_BUTTON_CAMERA, available_width); + processExtendButton(RS_BUTTON_MOVEMENT, available_width); } if (*available_width > 0) { - processExtendButton(RS_BUTTON_MOVEMENT, available_width); + processExtendButton(RS_BUTTON_CAMERA, available_width); } if (*available_width > 0) { @@ -1211,8 +1210,8 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible if ( (available_width + possible_shrunk_width) >= minimal_width) { // There is enough space for minimal width, but set the result_width - // to current_width so buttons widths decreasing will be done in predefined order - result_width = current_width; + // to preferred_width so buttons widths decreasing will be done in predefined order + result_width = (preferred_width > 0) ? preferred_width : current_width; decrease_width = true; } else -- cgit v1.2.3 From f08ab41c3e5d7824cb34378ba5a400795e7e888c Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Sat, 20 Feb 2010 13:11:25 -0500 Subject: Importing patch for EXT-5571 for Beta 3 release. Fix by Callum originally. --- indra/newview/llbottomtray.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 459a61dec3..3f60cec6da 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -915,7 +915,7 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ else { // - mSpeakBtn->setLabelVisible(false); + //mSpeakBtn->setLabelVisible(false); // HACK: this button doesn't change size so label should not be turned off S32 panel_width = mSpeakPanel->getRect().getWidth(); S32 possible_shrink_width = panel_width - panel_min_width; @@ -1006,7 +1006,7 @@ void LLBottomTray::processExtendButtons(S32* available_width) S32 panel_max_width = mObjectDefaultWidthMap[RS_BUTTON_SPEAK]; S32 panel_width = mSpeakPanel->getRect().getWidth(); S32 possible_extend_width = panel_max_width - panel_width; - if (possible_extend_width > 0 && possible_extend_width <= *available_width) + if (possible_extend_width >= 0 && possible_extend_width <= *available_width) // HACK: this button doesn't change size so possible_extend_width will be 0 { mSpeakBtn->setLabelVisible(true); mSpeakPanel->reshape(panel_max_width, mSpeakPanel->getRect().getHeight()); -- cgit v1.2.3