diff options
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/lllayoutstack.cpp | 46 | ||||
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/lllineeditor.h | 3 | 
3 files changed, 27 insertions, 25 deletions
| diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 940c7e7e18..3f56ec2c3d 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -47,47 +47,47 @@ LLLayoutPanel::LLLayoutPanel(const Params& p)   	mMaxDim(p.max_dim),    	mAutoResize(p.auto_resize),   	mUserResize(p.user_resize), -		mCollapsed(FALSE), -		mCollapseAmt(0.f), -		mVisibleAmt(1.f), // default to fully visible -		mResizeBar(NULL)  -	{ +	mCollapsed(FALSE), +	mCollapseAmt(0.f), +	mVisibleAmt(1.f), // default to fully visible +	mResizeBar(NULL)  +{  	// panels initialized as hidden should not start out partially visible  	if (!getVisible()) -		{ +	{  		mVisibleAmt = 0.f; -		} -		} +	} +}  void LLLayoutPanel::initFromParams(const Params& p) -		{ +{  	LLPanel::initFromParams(p);  	setFollowsNone(); -	} +}  LLLayoutPanel::~LLLayoutPanel() -	{ -		// probably not necessary, but... -		delete mResizeBar; -		mResizeBar = NULL; -	} +{ +	// probably not necessary, but... +	delete mResizeBar; +	mResizeBar = NULL; +}  F32 LLLayoutPanel::getCollapseFactor(LLLayoutStack::ELayoutOrientation orientation) -	{ +{  	if (orientation == LLLayoutStack::HORIZONTAL) -		{ -			F32 collapse_amt =  -			clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth())); -			return mVisibleAmt * collapse_amt; -		} -		else +	{ +		F32 collapse_amt =  +		clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, (F32)mMinDim / (F32)llmax(1, getRect().getWidth())); +		return mVisibleAmt * collapse_amt; +	} +	else  	{  			F32 collapse_amt =   			clamp_rescale(mCollapseAmt, 0.f, 1.f, 1.f, llmin(1.f, (F32)mMinDim / (F32)llmax(1, getRect().getHeight())));  			return mVisibleAmt * collapse_amt; -		}  	} +}  //  // LLLayoutStack diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 5f5fe851bb..bcfed1e920 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -88,6 +88,7 @@ LLLineEditor::Params::Params()  	revert_on_esc("revert_on_esc", true),  	commit_on_focus_lost("commit_on_focus_lost", true),  	ignore_tab("ignore_tab", true), +	is_password("is_password", false),  	cursor_color("cursor_color"),  	text_color("text_color"),  	text_readonly_color("text_readonly_color"), @@ -129,7 +130,7 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)  	mBorderThickness( 0 ),  	mIgnoreArrowKeys( FALSE ),  	mIgnoreTab( p.ignore_tab ), -	mDrawAsterixes( FALSE ), +	mDrawAsterixes( p.is_password ),  	mSelectAllonFocusReceived( p.select_on_focus ),  	mPassDelete(FALSE),  	mReadOnly(FALSE), diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index a1aa6b71c6..d9d36b73a3 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -85,7 +85,8 @@ public:  		Optional<bool>					select_on_focus,  										revert_on_esc,  										commit_on_focus_lost, -										ignore_tab; +										ignore_tab, +										is_password;  		// colors  		Optional<LLUIColor>				cursor_color, | 
