summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupiconctrl.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2015-12-11 17:41:41 +0200
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2015-12-11 17:41:41 +0200
commitaa42870d5ad1edc9ea33c62c5bf66e84375c3b0e (patch)
tree5bbd74f0b89fed271fc9ca8eb01ddd5954a26f94 /indra/newview/llgroupiconctrl.cpp
parentdca797c3db34d119ccdc2d6f24c7742df75ff9c6 (diff)
parenta53caef1e8314f9cf2af3c0081bf57d5f20db560 (diff)
Merged lindenlab/viewer-lion into default
Diffstat (limited to 'indra/newview/llgroupiconctrl.cpp')
-rwxr-xr-xindra/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 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);