From e6187ecaebcd39fd164f900a15710be6e21ecaf8 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 26 Nov 2009 15:45:06 +0200 Subject: Fixed low bug EXT-2746 ("All friends" list not scrolled when traversing it with arrow keys) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 8de3a8a96f..26a03e922a 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -554,12 +554,21 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) break; } - if ( key == KEY_UP || key == KEY_DOWN ) + if ( ( key == KEY_UP || key == KEY_DOWN ) && mSelectedItemPairs.size() ) { - LLRect selcted_rect = getLastSelectedItemRect().stretch(1); - LLRect visible_rect = getVisibleContentRect(); - if ( !visible_rect.contains (selcted_rect) ) - scrollToShowRect(selcted_rect); + LLRect visible_rc = getVisibleContentRect(); + LLRect selected_rc = getLastSelectedItemRect(); + + if ( !visible_rc.contains (selected_rc) ) + { + // But scroll in Items panel coordinates + scrollToShowRect(selected_rc); + } + + // In case we are in accordion tab notify parent to show selected rectangle + LLRect screen_rc; + localRectToScreen(selected_rc, &screen_rc); + notifyParent(LLSD().insert("scrollToShowRect",screen_rc.getValue())); handled = TRUE; } -- cgit v1.2.3 From 87ed47c9145c22e7b9e26f4bbca5282c128ac746 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 26 Nov 2009 22:43:13 +0200 Subject: Fixed the clipping of bottom pixels by LLScrollContainer, related to major bug EXT-2572 (the bottom of text on the bottom line in nearby chat is clipped) --HG-- branch : product-engine --- indra/llui/llscrollcontainer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index 5e17372fe9..d91b58b4ea 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -111,7 +111,8 @@ LLScrollContainer::LLScrollContainer(const LLScrollContainer::Params& p) LLView::addChild( mBorder ); mInnerRect.set( 0, getRect().getHeight(), getRect().getWidth(), 0 ); - mInnerRect.stretch( -mBorder->getBorderWidth() ); + if ( mBorder->getVisible() ) + mInnerRect.stretch( -mBorder->getBorderWidth() ); LLRect vertical_scroll_rect = mInnerRect; vertical_scroll_rect.mLeft = vertical_scroll_rect.mRight - scrollbar_size; @@ -189,7 +190,8 @@ void LLScrollContainer::reshape(S32 width, S32 height, LLUICtrl::reshape( width, height, called_from_parent ); mInnerRect = getLocalRect(); - mInnerRect.stretch( -mBorder->getBorderWidth() ); + if ( mBorder->getVisible() ) + mInnerRect.stretch( -mBorder->getBorderWidth() ); if (mScrolledView) { -- cgit v1.2.3 From b7001c640e8aa153037bbeecf53933f9ac9ee04c Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 27 Nov 2009 17:51:27 +0200 Subject: Fixed normal bug EXT-2932(Entering filter passes focus to the group list) --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 26a03e922a..ddfb0f8534 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -484,6 +484,8 @@ void LLFlatListView::rearrangeItems() void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) { if (!item_pair) return; + + setFocus(TRUE); bool select_item = !isSelected(item_pair); @@ -654,8 +656,6 @@ bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select) onCommit(); } - setFocus(TRUE); - // Stretch selected items rect to ensure it won't be clipped mSelectedItemsBorder->setRect(getSelectedItemsRect().stretch(-1)); -- cgit v1.2.3 From 1cc80c60ca37453a8a15f84e61cb2491f2f57403 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 27 Nov 2009 19:25:33 +0200 Subject: Fixed major bug EXT-2774(Crash when trying to resize top Menu with Fav bar and Nav bar closed). --HG-- branch : product-engine --- indra/llui/llresizebar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llresizebar.cpp b/indra/llui/llresizebar.cpp index a7cf9be277..0c46edf300 100644 --- a/indra/llui/llresizebar.cpp +++ b/indra/llui/llresizebar.cpp @@ -144,9 +144,10 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask) if( valid_rect.localPointInRect( screen_x, screen_y ) && mResizingView ) { // undock floater when user resize it - if (((LLFloater*)getParent())->isDocked()) + LLFloater* parent = dynamic_cast( getParent()); + if (parent && parent->isDocked()) { - ((LLFloater*)getParent())->setDocked(false, false); + parent->setDocked( false, false); } // Resize the parent -- cgit v1.2.3