From dee48496166e44f0e9b13a6c0b348d3409ddf0e5 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Tue, 1 Dec 2009 11:26:43 -0800 Subject: EXT-2635 No message reminding user that a restart is required to reset cache (was Clear Cache) EXT-2652 Favorites bar drop-down button (for when favorites exceed width of viewer) is not configurable via XUI EXT-2227 [BSI] Preferences -> Setup -> Cache Location blank EXT-1036 Clicking menu separators selects wrong menu option (allows selection of greyed-out option) reviewed by James --- indra/llui/llmenugl.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index f8935d03ac..907f2352a0 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -590,12 +590,13 @@ BOOL LLMenuItemSeparatorGL::handleMouseDown(S32 x, S32 y, MASK mask) LLMenuGL* parent_menu = getMenu(); if (y > getRect().getHeight() / 2) { - LLView* prev_menu_item = parent_menu->findPrevSibling(this); + // the menu items are in the child list in bottom up order + LLView* prev_menu_item = parent_menu->findNextSibling(this); return prev_menu_item ? prev_menu_item->handleMouseDown(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { - LLView* next_menu_item = parent_menu->findNextSibling(this); + LLView* next_menu_item = parent_menu->findPrevSibling(this); return next_menu_item ? next_menu_item->handleMouseDown(x, 0, mask) : FALSE; } } @@ -605,12 +606,12 @@ BOOL LLMenuItemSeparatorGL::handleMouseUp(S32 x, S32 y, MASK mask) LLMenuGL* parent_menu = getMenu(); if (y > getRect().getHeight() / 2) { - LLView* prev_menu_item = parent_menu->findPrevSibling(this); + LLView* prev_menu_item = parent_menu->findNextSibling(this); return prev_menu_item ? prev_menu_item->handleMouseUp(x, prev_menu_item->getRect().getHeight(), mask) : FALSE; } else { - LLView* next_menu_item = parent_menu->findNextSibling(this); + LLView* next_menu_item = parent_menu->findPrevSibling(this); return next_menu_item ? next_menu_item->handleMouseUp(x, 0, mask) : FALSE; } } -- cgit v1.2.3 From eb7bba01d45d889ced072498cce2d4e73a719398 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 2 Dec 2009 16:02:43 -0800 Subject: EXT-2572 partial fix for nearby chat text clipping at the bottom Fixes 1 pixel of clipping caused by LLScrollContainer. Text is still clipped by 1 pixel, down from 2. Added more test text boxes to floater_test_textbox.xml Reviewed with Leyla. --- indra/llui/llscrollcontainer.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 53c5a8d07d..f6caed4617 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -111,7 +111,7 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) LLView::addChild( mBorder ); mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 ); - mInnerRect.stretch( -mBorder->getBorderWidth() ); + mInnerRect.stretch( -getBorderWidth() ); LLRect vertical_scroll_rect = mInnerRect; vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - scrollbar_size; @@ -189,7 +189,7 @@ void LLScrollContainer::reshape(S32 width, S32 height, LLUICtrl::reshape( width, height, called_from_parent ); mInnerRect = getLocalRect(); - mInnerRect.stretch( -mBorder->getBorderWidth() ); + mInnerRect.stretch( -getBorderWidth() ); if (mScrolledView) { @@ -351,9 +351,9 @@ void LLScrollContainer::calcVisibleSize( S32 *visible_width, S32 *visible_height S32 doc_width = doc_rect.getWidth(); S32 doc_height = doc_rect.getHeight(); - S32 border_width = (mBorder->getVisible() ? 2 * mBorder->getBorderWidth() : 0); - *visible_width = getRect().getWidth() - border_width; - *visible_height = getRect().getHeight() - border_width; + S32 border_width = getBorderWidth(); + *visible_width = getRect().getWidth() - 2 * border_width; + *visible_height = getRect().getHeight() - 2 * border_width; *show_v_scrollbar = FALSE; *show_h_scrollbar = FALSE; @@ -499,7 +499,7 @@ void LLScrollContainer::updateScroll() BOOL show_h_scrollbar = FALSE; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); - S32 border_width = mBorder->getBorderWidth(); + S32 border_width = getBorderWidth(); if( show_v_scrollbar ) { if( doc_rect.mTop < getRect().getHeight() - border_width ) @@ -573,6 +573,9 @@ void LLScrollContainer::updateScroll() void LLScrollContainer::setBorderVisible(BOOL b) { mBorder->setVisible( b ); + // Recompute inner rect, as border visibility changes it + mInnerRect = getLocalRect(); + mInnerRect.stretch( -getBorderWidth() ); } LLRect LLScrollContainer::getVisibleContentRect() @@ -593,7 +596,7 @@ LLRect LLScrollContainer::getContentWindowRect() BOOL show_h_scrollbar = FALSE; BOOL show_v_scrollbar = FALSE; calcVisibleSize( &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); - S32 border_width = mBorder->getVisible() ? mBorder->getBorderWidth() : 0; + S32 border_width = getBorderWidth(); scroller_view_rect.setOriginAndSize(border_width, show_h_scrollbar ? mScrollbar[HORIZONTAL]->getRect().mTop : border_width, visible_width, @@ -626,7 +629,7 @@ void LLScrollContainer::scrollToShowRect(const LLRect& rect, const LLRect& const rect_to_constrain.mTop - constraint.mTop); // translate from allowable region for lower left corner to upper left corner - allowable_scroll_rect.translate(0, content_window_rect.getHeight() - 1); + allowable_scroll_rect.translate(0, content_window_rect.getHeight()); S32 vert_pos = llclamp(mScrollbar[VERTICAL]->getDocPos(), mScrollbar[VERTICAL]->getDocSize() - allowable_scroll_rect.mTop, // min vertical scroll @@ -674,7 +677,7 @@ void LLScrollContainer::goToBottom() S32 LLScrollContainer::getBorderWidth() const { - if (mBorder) + if (mBorder->getVisible()) { return mBorder->getBorderWidth(); } -- cgit v1.2.3