diff options
author | Dave Parks <davep@lindenlab.com> | 2014-03-18 14:06:15 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2014-03-18 14:06:15 -0500 |
commit | 26dafd22fd30348e6e52e8067b7ea5dd1f5542e3 (patch) | |
tree | 8acdbbf50af1bb447847bcf46b79354943cbf11a /indra/newview | |
parent | 782a7e267cd42af4f60fa5e2984823d88fbb27de (diff) | |
parent | f023c677782168cdd48af8e897900f0dfef9fba8 (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-lion
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llcolorswatch.h | 3 | ||||
-rwxr-xr-x | indra/newview/llfloatercolorpicker.cpp | 14 |
2 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 5bdd1712d2..b3b6cfe32d 100755 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -59,6 +59,7 @@ public: Optional<LLUIImage*> alpha_background_image; Optional<commit_callback_t> cancel_callback; Optional<commit_callback_t> select_callback; + Optional<commit_callback_t> preview_callback; Optional<LLUIColor> border_color; Optional<S32> label_width; Optional<S32> label_height; @@ -87,6 +88,7 @@ public: void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; } void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; } void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; } + void setPreviewCallback(commit_callback_t cb) { mPreviewCallback = cb; } void setFallbackImageName(const std::string& name) { mFallbackImageName = name; } void showPicker(BOOL take_focus); @@ -112,6 +114,7 @@ protected: BOOL mCanApplyImmediately; commit_callback_t mOnCancelCallback; commit_callback_t mOnSelectCallback; + commit_callback_t mPreviewCallback; S32 mLabelWidth; S32 mLabelHeight; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index a03425649f..7ba7660f19 100755 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -347,6 +347,11 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn ) curG = curGIn; curB = curBIn; + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } + // update corresponding HSL values and LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL); @@ -374,6 +379,11 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn ) // update corresponding RGB values and hslToRgb ( curH, curS, curL, curR, curG, curB ); + + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } } ////////////////////////////////////////////////////////////////////////////// @@ -463,10 +473,6 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data) void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te ) { setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]); - if (mApplyImmediateCheck->get()) - { - LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); - } } void LLFloaterColorPicker::onMouseCaptureLost() |