diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-02 14:17:24 -0500 |
| commit | 0a7ac2fc170d0a2144eca924f5a0b8ffa8363ce4 (patch) | |
| tree | 4b224e6b5e55d37690b4639e05b893cd04a4058e /indra/llui/lliconctrl.cpp | |
| parent | 86b1ee7703bb57c6b1e1c068cda02bfb9ed0721e (diff) | |
| parent | 3783852444825edf420e6109927df21fd004c3e7 (diff) | |
merge
Diffstat (limited to 'indra/llui/lliconctrl.cpp')
| -rw-r--r-- | indra/llui/lliconctrl.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/llui/lliconctrl.cpp b/indra/llui/lliconctrl.cpp index 66c2ba682f..b1bd2b89a9 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,15 @@ 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) ; + } + } +} + |
