diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterprofiletexture.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llfloaterprofiletexture.cpp b/indra/newview/llfloaterprofiletexture.cpp index 743685e7d1..bf1f56a6d1 100644 --- a/indra/newview/llfloaterprofiletexture.cpp +++ b/indra/newview/llfloaterprofiletexture.cpp @@ -115,6 +115,16 @@ void LLFloaterProfileTexture::updateDimensions() S32 width = old_floater_rect.getWidth() - old_image_rect.getWidth() + mLastWidth; S32 height = old_floater_rect.getHeight() - old_image_rect.getHeight() + mLastHeight; + const F32 MAX_DIMENTIONS = 512; // most profiles are supposed to be 256x256 + + S32 biggest_dim = llmax(width, height); + if (biggest_dim > MAX_DIMENTIONS) + { + F32 scale_down = MAX_DIMENTIONS / (F32)biggest_dim; + width *= scale_down; + height *= scale_down; + } + //reshape floater reshape(width, height); |