diff options
| author | gabriel lee <gabriel@lindenlab.com> | 2010-02-02 10:58:47 +0000 |
|---|---|---|
| committer | gabriel lee <gabriel@lindenlab.com> | 2010-02-02 10:58:47 +0000 |
| commit | 95d0df4ab05c4cfcc78f684ab28d36b9cc84410e (patch) | |
| tree | b1621cd22044edade98019af9d1b77383e3b88ef /indra/llui/llspinctrl.cpp | |
| parent | 5dfdb0d5a41143512180390193ce79644bcb9469 (diff) | |
| parent | 4ad357ec70e15afdfe78816990cb23c7ba17619c (diff) | |
merged back my last changes
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) |
