diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-02 18:08:04 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-02 18:08:04 +0200 |
commit | 3dc509bec08d39d44c8a2c1e81d31922a6c11239 (patch) | |
tree | 171e8b91df89fc581eb7189c2ed45a450aadef41 /indra/llui/lliconctrl.cpp | |
parent | b06bc5944c23ccadfb6c99c65f4d498acc5e2a2d (diff) | |
parent | 265805a1b02555c01f9f2ac42000dbc731ab31c6 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
-rw-r--r-- | indra/llui/lliconctrl.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 66c2ba682f..1e2353b488 100644 --- a/indra/llui/lliconctrl.cpp +++ b/indra/llui/lliconctrl.cpp @@ -57,7 +57,9 @@ LLIconCtrl::LLIconCtrl(const LLIconCtrl::Params& p) : LLUICtrl(p), mColor(p.color()), mImagep(p.image), - mPriority(0) + mPriority(0), + mDrawWidth(0), + mDrawHeight(0) { if (mImagep.notNull()) { @@ -100,6 +102,8 @@ void LLIconCtrl::setValue(const LLSD& value ) { mImagep = LLUI::getUIImage(tvalue.asString(), mPriority); } + + setIconImageDrawSize(); } std::string LLIconCtrl::getImageName() const @@ -109,3 +113,16 @@ std::string LLIconCtrl::getImageName() const else return std::string(); } + +void LLIconCtrl::setIconImageDrawSize() +{ + if(mImagep.notNull() && mDrawWidth && mDrawHeight) + { + if(mImagep->getImage().notNull()) + { + mImagep->getImage()->setKnownDrawSize(mDrawWidth, mDrawHeight) ; + } + } +} + + |