diff options
| author | andreykproductengine <akleshchev@productengine.com> | 2015-12-09 18:35:36 +0200 |
|---|---|---|
| committer | andreykproductengine <akleshchev@productengine.com> | 2015-12-09 18:35:36 +0200 |
| commit | a53caef1e8314f9cf2af3c0081bf57d5f20db560 (patch) | |
| tree | a7861ca572903e3f6c809e522b3e124a6e1c9968 /indra/newview/llgroupiconctrl.cpp | |
| parent | 35e1c735a3ce01e8f4c6fb24b173c019086a88cb (diff) | |
MAINT-4018 Improvements to icon fetching.
Diffstat (limited to 'indra/newview/llgroupiconctrl.cpp')
| -rwxr-xr-x | indra/newview/llgroupiconctrl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 6abf9ea637..1974a073dd 100755 --- a/indra/newview/llgroupiconctrl.cpp +++ b/indra/newview/llgroupiconctrl.cpp @@ -37,7 +37,10 @@ LLGroupIconCtrl::Params::Params() : group_id("group_id"), draw_tooltip("draw_tooltip", true), default_icon_name("default_icon_name") -{} +{ + changeDefault(min_width, 32); + changeDefault(min_height, 32); +} LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p) @@ -48,6 +51,12 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p) { mPriority = LLViewerFetchedTexture::BOOST_ICON; + // don't request larger image then necessary to save gl memory, + // but ensure that quality is sufficient + LLRect rect = p.rect; + mMaxHeight = llmax((S32)p.min_height, rect.getHeight()); + mMaxWidth = llmax((S32)p.min_width, rect.getWidth()); + if (p.group_id.isProvided()) { LLSD value(p.group_id); |
