diff options
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llaccordionctrltab.cpp | 8 | ||||
| -rw-r--r-- | indra/llui/llflatlistview.h | 5 | ||||
| -rw-r--r-- | indra/llui/llfloater.cpp | 12 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 8 | ||||
| -rw-r--r-- | indra/llui/lltextbase.cpp | 11 | 
5 files changed, 37 insertions, 7 deletions
| diff --git a/indra/llui/llaccordionctrltab.cpp b/indra/llui/llaccordionctrltab.cpp index e12776f83a..0959722aa6 100644 --- a/indra/llui/llaccordionctrltab.cpp +++ b/indra/llui/llaccordionctrltab.cpp @@ -465,10 +465,11 @@ void LLAccordionCtrlTab::setHeaderVisible(bool value)  	reshape(getRect().getWidth(), getRect().getHeight(), FALSE);  }; -//vurtual +//virtual  BOOL LLAccordionCtrlTab::postBuild()  { -	mHeader->setVisible(mHeaderVisible); +	if(mHeader) +		mHeader->setVisible(mHeaderVisible);  	static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); @@ -504,7 +505,8 @@ BOOL LLAccordionCtrlTab::postBuild()  		mScrollbar->setVisible(false);  	} -	mContainerPanel->setVisible(mDisplayChildren); +	if(mContainerPanel) +		mContainerPanel->setVisible(mDisplayChildren);  	return LLUICtrl::postBuild();  } diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 92cb40332e..5a1ddc2c59 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -379,11 +379,14 @@ private:  	void setNoItemsCommentVisible(bool visible) const; -private: +protected:  	/** Comparator to use when sorting the list. */  	const ItemComparator* mItemComparator; + +private: +  	LLPanel* mItemsPanel;  	S32 mItemsNoScrollWidth; diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a9accc0ba6..104ae19eda 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -1121,6 +1121,7 @@ void LLFloater::setIsChrome(BOOL is_chrome)  		setFocus(FALSE);  		// can't Ctrl-Tab to "chrome" floaters  		setFocusRoot(FALSE); +		mButtons[BUTTON_CLOSE]->setToolTip(LLStringExplicit(getButtonTooltip(Params(), BUTTON_CLOSE, is_chrome)));  	}  	// no titles displayed on "chrome" floaters @@ -1844,7 +1845,7 @@ void LLFloater::buildButtons(const Params& floater_params)  		p.click_callback.function(boost::bind(sButtonCallbacks[i], this));  		p.tab_stop(false);  		p.follows.flags(FOLLOWS_TOP|FOLLOWS_RIGHT); -		p.tool_tip = getButtonTooltip(floater_params, (EFloaterButton)i); +		p.tool_tip = getButtonTooltip(floater_params, (EFloaterButton)i, getIsChrome());  		p.scale_image(true);  		p.chrome(true); @@ -1899,8 +1900,15 @@ LLUIImage* LLFloater::getButtonPressedImage(const Params& p, EFloaterButton e)  }  // static -std::string LLFloater::getButtonTooltip(const Params& p, EFloaterButton e) +std::string LLFloater::getButtonTooltip(const Params& p, EFloaterButton e, bool is_chrome)  { +	// EXT-4081 (Lag Meter: Ctrl+W does not close floater) +	// If floater is chrome set 'Close' text for close button's tooltip +	if(is_chrome && BUTTON_CLOSE == e) +	{ +		static std::string close_tooltip_chrome = LLTrans::getString("BUTTON_CLOSE_CHROME"); +		return close_tooltip_chrome; +	}  	// TODO: per-floater localizable tooltips set in XML  	return sButtonToolTips[e];  } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 97d2bda594..d8c77370f6 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -322,8 +322,14 @@ private:  	// up by index.  	static LLUIImage*	getButtonImage(const Params& p, EFloaterButton e);  	static LLUIImage*	getButtonPressedImage(const Params& p, EFloaterButton e); -	static std::string	getButtonTooltip(const Params& p, EFloaterButton e); +	/** +	 * @params is_chrome - if floater is Chrome it means that floater will never get focus. +	 * Therefore it can't be closed with 'Ctrl+W'. So the tooltip text of close button( X ) +	 * should be 'Close' not 'Close(Ctrl+W)' as for usual floaters. +	 */ +	static std::string	getButtonTooltip(const Params& p, EFloaterButton e, bool is_chrome); +  	BOOL			offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index);  	void			addResizeCtrls();  	void			layoutResizeCtrls(); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5f4b16ec9e..56d7a63832 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -962,7 +962,18 @@ void LLTextBase::reshape(S32 width, S32 height, BOOL called_from_parent)  {  	if (width != getRect().getWidth() || height != getRect().getHeight())  	{ +		//EXT-4288 +		//to keep consistance scrolling behaviour  +		//when scrolling from top and from bottom... +		bool is_scrolled_to_end = (mScroller!=NULL) && scrolledToEnd(); +		  		LLUICtrl::reshape( width, height, called_from_parent ); +	 +		if (is_scrolled_to_end) +		{ +			deselect(); +			endOfDoc(); +		}		  		// do this first after reshape, because other things depend on  		// up-to-date mVisibleTextRect | 
