diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-03 19:21:14 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-03 19:21:14 +0000 |
commit | b5936a4b1d8780b5b8cd425998eacd2c64ffa693 (patch) | |
tree | c1581bcf34e96a897c6e1d9a4aed95f353713baa /indra/llui/llfloater.cpp | |
parent | 55c25229b79b1755c989e5996c8e8d118f369721 (diff) |
1.19.1 Viewer merge: QAR_367, QAR-374, QAR-408, QAR-426
QAR_367 (RC1) - merge Branch_1-19-1-Viewer -r 81609 : 81993 -> release
QAR-374 (RC2) - merge Branch_1-19-1-Viewer -r 81993 : 82589 -> release
QAR-408 (RC3) - merge Branch_1-19-1-Viewer -r 82589 : 83128 -> release
QAR-426 (rc4) - merge Branch_1-19-1-Viewer -r 83125 : 83719 -> release
(Actual merge: release@83793 Branch_1-19-1-Viewer-merge@83953 -> release)
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a6c35b67a8..b69ac30e9c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -154,7 +154,7 @@ LLFloater::LLFloater(const LLString& name) mButtons[i] = NULL; } LLString title; // null string - init(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults + initFloater(title, FALSE, DEFAULT_MIN_WIDTH, DEFAULT_MIN_HEIGHT, FALSE, TRUE, TRUE); // defaults } @@ -173,7 +173,7 @@ LLFloater::LLFloater(const LLString& name, const LLRect& rect, const LLString& t mButtonsEnabled[i] = FALSE; mButtons[i] = NULL; } - init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); + initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); } LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const LLString& title, @@ -191,12 +191,12 @@ LLFloater::LLFloater(const LLString& name, const LLString& rect_control, const L mButtonsEnabled[i] = FALSE; mButtons[i] = NULL; } - init( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); + initFloater( title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); } // Note: Floaters constructed from XML call init() twice! -void LLFloater::init(const LLString& title, +void LLFloater::initFloater(const LLString& title, BOOL resizable, S32 min_width, S32 min_height, BOOL drag_on_left, BOOL minimizable, BOOL close_btn) { @@ -576,6 +576,11 @@ void LLFloater::close(bool app_quitting) } } +/*virtual*/ +void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent) +{ + LLPanel::reshape(width, height, called_from_parent); +} void LLFloater::releaseFocus() { @@ -777,8 +782,6 @@ void LLFloater::setMinimized(BOOL minimize) { mExpandedRect = getRect(); - reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE); - // If the floater has been dragged while minimized in the // past, then locate it at its previous minimized location. // Otherwise, ask the view for a minimize position. @@ -833,6 +836,9 @@ void LLFloater::setMinimized(BOOL minimize) } mMinimized = TRUE; + + // Reshape *after* setting mMinimized + reshape( MINIMIZED_WIDTH, LLFLOATER_HEADER_SIZE, TRUE); } else { @@ -845,7 +851,6 @@ void LLFloater::setMinimized(BOOL minimize) mPreviousMinimizedBottom = currentRect.mBottom; } - reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); setOrigin( mExpandedRect.mLeft, mExpandedRect.mBottom ); if (mButtonsEnabled[BUTTON_RESTORE]) @@ -874,6 +879,9 @@ void LLFloater::setMinimized(BOOL minimize) } mMinimized = FALSE; + + // Reshape *after* setting mMinimized + reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE ); } make_ui_sound("UISndWindowClose"); updateButtons(); @@ -1639,11 +1647,11 @@ LLFloaterView::LLFloaterView( const LLString& name, const LLRect& rect ) // By default, adjust vertical. void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent) { - reshape(width, height, called_from_parent, ADJUST_VERTICAL_YES); + reshapeFloater(width, height, called_from_parent, ADJUST_VERTICAL_YES); } // When reshaping this view, make the floaters follow their closest edge. -void LLFloaterView::reshape(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical) +void LLFloaterView::reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical) { S32 old_width = getRect().getWidth(); S32 old_height = getRect().getHeight(); @@ -2910,7 +2918,7 @@ void LLFloater::initFloaterXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor setRect(rect); setName(name); - init(title, + initFloater(title, resizable, min_width, min_height, |