summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupiconctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgroupiconctrl.cpp')
-rw-r--r--indra/newview/llgroupiconctrl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp
index 6abf9ea637..1974a073dd 100644
--- 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);