diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 01:52:28 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 01:52:28 -0800 |
commit | 2d7697dfade4ecbb8fbe9b26a5332fc9e93f5669 (patch) | |
tree | 5e956b1e9bfc1efd65bcd365abac613b4d4baf04 /indra/llui/llspinctrl.cpp | |
parent | 5c73a908353cdd7210e3148f7162d30afab7873a (diff) | |
parent | 6ea944b38f1e619df2c52283f6b33bbcc1cbbc40 (diff) |
automated merge
Diffstat (limited to 'indra/llui/llspinctrl.cpp')
-rw-r--r-- | indra/llui/llspinctrl.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index 20a1ab7af3..28f3788817 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -270,13 +270,19 @@ void LLSpinCtrl::clear() mbHasBeenSet = FALSE; } - +void LLSpinCtrl::updateLabelColor() +{ + if( mLabelBox ) + { + mLabelBox->setColor( getEnabled() ? mTextEnabledColor.get() : mTextDisabledColor.get() ); + } +} void LLSpinCtrl::updateEditor() { LLLocale locale(LLLocale::USER_LOCALE); - // Don't display very small negative values as -0.000 + // Don't display very small negative valu es as -0.000 F32 displayed_value = clamp_precision((F32)getValue().asReal(), mPrecision); // if( S32( displayed_value * pow( 10, mPrecision ) ) == 0 ) @@ -339,10 +345,7 @@ void LLSpinCtrl::setEnabled(BOOL b) { LLView::setEnabled( b ); mEditor->setEnabled( b ); - if( mLabelBox ) - { - mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() ); - } + updateLabelColor(); } @@ -390,6 +393,7 @@ void LLSpinCtrl::setLabel(const LLStringExplicit& label) { llwarns << "Attempting to set label on LLSpinCtrl constructed without one " << getName() << llendl; } + updateLabelColor(); } void LLSpinCtrl::setAllowEdit(BOOL allow_edit) |