From fdeb1a5c76e532ad8035963094a7fe98c998b176 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Mon, 14 Jun 2010 15:02:15 +0300 Subject: EXT-7800 FIX add scroll wheel handle to accordion tab reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/577/ --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 13 +++++++++++++ indra/llui/llaccordionctrltab.h | 2 ++ 2 files changed, 15 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index 1bc8086a27..be231fd8cf 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -968,3 +968,16 @@ BOOL LLAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask) } return LLUICtrl::handleToolTip(x, y, mask); } +BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks ) +{ + if( LLUICtrl::handleScrollWheel(x,y,clicks)) + { + return TRUE; + } + if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) + { + return TRUE; + } + return FALSE; +} + diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 480b26e130..19d4ec0a1c 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -166,6 +166,8 @@ public: virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); + virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); + virtual bool addChild(LLView* child, S32 tab_group); -- cgit v1.2.3 From 380f472308e3be7af3b3efb57098cc30aee2c901 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 15:37:39 -0700 Subject: EXT-7833 FIX [crashhunters] Crash in LLTextBase::reflow() --- indra/llui/lltextbase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 1a4b804ce4..3c6c7d3e82 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2803,13 +2803,13 @@ S32 LLImageTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { LLUIImagePtr image = mStyle->getImage(); S32 image_width = image->getWidth(); - if(num_pixels>image_width + IMAGE_HPAD) + if(line_offset == 0 || num_pixels>image_width + IMAGE_HPAD) { return 1; } - return 0; } + F32 LLImageTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect) { if ( (start >= 0) && (end <= mEnd - mStart)) -- cgit v1.2.3 From e97cef4de92f446bb51b4137ce64605f74d7f48e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 14 Jun 2010 15:38:02 -0700 Subject: EXT-7664 FIX Titles of all floaters are shifted down --- indra/llui/llfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 341debc9a8..9a56372e68 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -347,7 +347,7 @@ void LLFloater::layoutDragHandle() { rect = getLocalRect(); } - mDragHandle->setRect(rect); + mDragHandle->setShape(rect); updateTitleButtons(); } -- cgit v1.2.3 From 55cc54a06faebb26a4ee2df24bfc9c98ea858f62 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 15 Jun 2010 16:02:45 +0300 Subject: EXT-7860 FIXED added check against NULL for member pointer. Reviewed by Vadim Savchuk. --HG-- branch : product-engine --- indra/llui/llaccordionctrltab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index be231fd8cf..54bb328a18 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -974,7 +974,7 @@ BOOL LLAccordionCtrlTab::handleScrollWheel ( S32 x, S32 y, S32 clicks ) { return TRUE; } - if( mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) + if( mScrollbar && mScrollbar->getVisible() && mScrollbar->handleScrollWheel( 0, 0, clicks ) ) { return TRUE; } -- cgit v1.2.3 From e460985ddf0d427aba268c8746efd4fad2419c8d Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Tue, 15 Jun 2010 21:52:15 +0300 Subject: EXT-7639 FIXED added shop button which reacts according to the ticket description - Added method LLAccordionCtrl::getExpandedTab() which search for the first expanded accordion tab. This method is a bit of hacking, but I discussed it with Vadim Savchuk. - LLAccordionCtrlTab::isExpanded() is made 'const'. This is necessary to call it from getExpandedTab() which is also 'const'. - Added all provided Marketplace URLs (taken from EXT-7257) to the settings.xml. So URLs can be configured without recompilation. - Added method LLCOFWearables::getSelectedItems() which can be used to get ALL selected items (not only one). - Class LLShopURLDispatcher is implemented in the llpaneloutfitedit.cpp. - Added callback LLPanelOutfitEdit::onShopButtonClicked() which calls LLShopURLDispatcher to send user to the correct URL. - Added shop button (shop_btn) widget in panel_outfit_edit.xml. It has invalid icon for now. After review I'm going to reassign the ticket to someone who will provide correct icons. Reviewed by Vadim Savchuk and Mike Antipov at https://codereview.productengine.com/secondlife/r/569/ --HG-- branch : product-engine --- indra/llui/llaccordionctrl.cpp | 18 ++++++++++++++++++ indra/llui/llaccordionctrl.h | 7 +++++++ indra/llui/llaccordionctrltab.h | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index fc93793ed8..3a1e9f19fa 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -826,6 +826,24 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string) mNoVisibleTabsHelpText->setValue(text); } +const LLAccordionCtrlTab* LLAccordionCtrl::getExpandedTab() const +{ + typedef std::vector::const_iterator tabs_const_iterator; + + const LLAccordionCtrlTab* result = 0; + + for (tabs_const_iterator i = mAccordionTabs.begin(); i != mAccordionTabs.end(); ++i) + { + if ((*i)->isExpanded()) + { + result = *i; + break; + } + } + + return result; +} + S32 LLAccordionCtrl::calcExpandedTabHeight(S32 tab_index /* = 0 */, S32 available_height /* = 0 */) { if(tab_index < 0) diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index fc6f2d896c..677b598a32 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -129,6 +129,13 @@ public: */ void setFilterSubString(const std::string& filter_string); + /** + * This method returns the first expanded accordion tab. + * It is expected to be called for accordion which doesn't allow multiple + * tabs to be expanded. Use with care. + */ + const LLAccordionCtrlTab* getExpandedTab() const; + private: void initNoTabsWidget(const LLTextBox::Params& tb_params); void updateNoTabsHelpTextVisibility(); diff --git a/indra/llui/llaccordionctrltab.h b/indra/llui/llaccordionctrltab.h index 19d4ec0a1c..7bf7eeef8f 100644 --- a/indra/llui/llaccordionctrltab.h +++ b/indra/llui/llaccordionctrltab.h @@ -171,7 +171,7 @@ public: virtual bool addChild(LLView* child, S32 tab_group); - bool isExpanded() { return mDisplayChildren; } + bool isExpanded() const { return mDisplayChildren; } S32 getHeaderHeight(); -- cgit v1.2.3 From 3ad0981d2f80a053a4bc22d659a129b3640852d4 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Wed, 16 Jun 2010 19:43:24 +0300 Subject: EXT-7823 FIXED Accordion widget was improved to show different message when no_matched_tabs in panel or no_visible_tabs in panel. Added "no_matched" and "no_visible" text for TeleportHistory. + Added "no_visible" text for My Outfit list. + Fixed filtering in TeleportHistory. Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/591/ --HG-- branch : product-engine --- indra/llui/llaccordionctrl.cpp | 7 ++++--- indra/llui/llaccordionctrl.h | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llaccordionctrl.cpp b/indra/llui/llaccordionctrl.cpp index 3a1e9f19fa..237d42090f 100644 --- a/indra/llui/llaccordionctrl.cpp +++ b/indra/llui/llaccordionctrl.cpp @@ -68,8 +68,9 @@ LLAccordionCtrl::LLAccordionCtrl(const Params& params):LLPanel(params) , mSelectedTab( NULL ) , mTabComparator( NULL ) , mNoVisibleTabsHelpText(NULL) + , mNoVisibleTabsOrigString(params.no_visible_tabs_text.initial_value().asString()) { - initNoTabsWidget(params.empty_accordion_text); + initNoTabsWidget(params.no_matched_tabs_text); mSingleExpansion = params.single_expansion; if(mFitParent && !mSingleExpansion) @@ -379,7 +380,7 @@ void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params) { LLTextBox::Params tp = tb_params; tp.rect(getLocalRect()); - mNoVisibleTabsOrigString = tp.initial_value().asString(); + mNoMatchedTabsOrigString = tp.initial_value().asString(); mNoVisibleTabsHelpText = LLUICtrlFactory::create(tp, this); } @@ -820,7 +821,7 @@ void LLAccordionCtrl::setFilterSubString(const std::string& filter_string) { LLStringUtil::format_map_t args; args["[SEARCH_TERM]"] = LLURI::escape(filter_string); - std::string text = filter_string.empty() ? LLStringUtil::null : mNoVisibleTabsOrigString; + std::string text = filter_string.empty() ? mNoVisibleTabsOrigString : mNoMatchedTabsOrigString; LLStringUtil::format(text, args); mNoVisibleTabsHelpText->setValue(text); diff --git a/indra/llui/llaccordionctrl.h b/indra/llui/llaccordionctrl.h index 677b598a32..3ad5274085 100644 --- a/indra/llui/llaccordionctrl.h +++ b/indra/llui/llaccordionctrl.h @@ -78,12 +78,14 @@ public: accordion tabs are responsible for scrolling their content. *NOTE fit_parent works best when combined with single_expansion. Accordion view should implement getRequiredRect() and provide valid height*/ - Optional empty_accordion_text; + Optional no_matched_tabs_text; + Optional no_visible_tabs_text; Params() : single_expansion("single_expansion",false) , fit_parent("fit_parent", false) - , empty_accordion_text("empty_accordion_text") + , no_matched_tabs_text("no_matched_tabs_text") + , no_visible_tabs_text("no_visible_tabs_text") {}; }; @@ -180,6 +182,8 @@ private: bool mAutoScrolling; F32 mAutoScrollRate; LLTextBox* mNoVisibleTabsHelpText; + + std::string mNoMatchedTabsOrigString; std::string mNoVisibleTabsOrigString; LLAccordionCtrlTab* mSelectedTab; -- cgit v1.2.3