diff options
| author | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-29 18:03:39 +0300 |
|---|---|---|
| committer | Paul ProductEngine <pguslisty@productengine.com> | 2011-09-29 18:03:39 +0300 |
| commit | 6a463a41fec89c7f1eadb77c16eeae169ff777d0 (patch) | |
| tree | f297c32418eb139eded752ce99b418773328e458 /indra/llui/llresizehandle.cpp | |
| parent | c44db34a15abd2e96b8fd461e9fb3e217fe648cc (diff) | |
| parent | 71ed326f51770b215ba5dd2ac8d159c3b764c2d2 (diff) | |
Merge sergeylproductengine/viewer-experience-fui with richard/viewer-experience-fui
Diffstat (limited to 'indra/llui/llresizehandle.cpp')
| -rw-r--r-- | indra/llui/llresizehandle.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llui/llresizehandle.cpp b/indra/llui/llresizehandle.cpp index c3a51c36c9..942e84eeb6 100644 --- a/indra/llui/llresizehandle.cpp +++ b/indra/llui/llresizehandle.cpp @@ -55,6 +55,8 @@ LLResizeHandle::LLResizeHandle(const LLResizeHandle::Params& p) mImage( NULL ), mMinWidth( p.min_width ), mMinHeight( p.min_height ), + mMaxWidth(S32_MAX), + mMaxHeight(S32_MAX), mCorner( p.corner ) { if( RIGHT_BOTTOM == mCorner) @@ -177,6 +179,11 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) new_width = mMinWidth; delta_x = x_multiple * (mMinWidth - orig_rect.getWidth()); } + else if (new_width > mMaxWidth) + { + new_width = mMaxWidth; + delta_x = x_multiple * (mMaxWidth - orig_rect.getWidth()); + } S32 new_height = orig_rect.getHeight() + y_multiple * delta_y; if( new_height < mMinHeight ) @@ -184,6 +191,11 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) new_height = mMinHeight; delta_y = y_multiple * (mMinHeight - orig_rect.getHeight()); } + else if (new_height > mMaxHeight) + { + new_height = mMaxHeight; + delta_y = y_multiple * (mMaxHeight - orig_rect.getHeight()); + } switch( mCorner ) { |
