diff options
| author | Paul Guslisty <pguslisty@productengine.com> | 2010-08-24 12:39:11 +0300 |
|---|---|---|
| committer | Paul Guslisty <pguslisty@productengine.com> | 2010-08-24 12:39:11 +0300 |
| commit | f305ddc7f773454826a09a8d52c33735eb7c95ea (patch) | |
| tree | ea6259ee11252bd93bf488372c28148d14e6b287 /indra/llui | |
| parent | 76283d5cfb6923ba609533fcf71d5231060314df (diff) | |
EXT-7951 RESTORED IN VIEWER-DEVELOPMENT REPO (Mini-Location panel appearance design issues)
- Added callback on show\hide Mini Location Panel event. This callback sets proper initial minimized position depending on state (shown or hidded) Mini Location Panel. Also callback shifts vertically already minimized floaters so that they don't overlap Mini Location Panel
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/851/
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui')
| -rw-r--r-- | indra/llui/llfloater.cpp | 14 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 3cfb2c5d4a..3fcb5f9f03 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2279,6 +2279,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom) S32 floater_header_size = default_params.header_height; static LLUICachedControl<S32> minimized_width ("UIMinimizedWidth", 0); LLRect snap_rect_local = getLocalSnapRect(); + snap_rect_local.mTop += mVMinimizePositionOffset; for(S32 col = snap_rect_local.mLeft; col < snap_rect_local.getWidth() - minimized_width; col += minimized_width) @@ -2376,6 +2377,19 @@ BOOL LLFloaterView::allChildrenClosed() return true; } +void LLFloaterView::shiftFloaters(S32 x_offset, S32 y_offset) +{ + for (child_list_const_iter_t it = getChildList()->begin(); it != getChildList()->end(); ++it) + { + LLFloater* floaterp = dynamic_cast<LLFloater*>(*it); + + if (floaterp && floaterp->isMinimized()) + { + floaterp->translate(x_offset, y_offset); + } + } +} + void LLFloaterView::refresh() { // Constrain children to be entirely on the screen diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 2deae29607..cd24471345 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -449,6 +449,7 @@ public: // Given a child of gFloaterView, make sure this view can fit entirely onscreen. void adjustToFitScreen(LLFloater* floater, BOOL allow_partial_outside); + void setMinimizePositionVerticalOffset(S32 offset) { mVMinimizePositionOffset = offset; } void getMinimizePosition( S32 *left, S32 *bottom); void restoreAll(); // un-minimize all floaters typedef std::set<LLView*> skip_list_t; @@ -465,6 +466,7 @@ public: // attempt to close all floaters void closeAllChildren(bool app_quitting); BOOL allChildrenClosed(); + void shiftFloaters(S32 x_offset, S32 y_offset); LLFloater* getFrontmost() const; LLFloater* getBackmost() const; @@ -484,6 +486,7 @@ private: BOOL mFocusCycleMode; S32 mSnapOffsetBottom; S32 mSnapOffsetRight; + S32 mVMinimizePositionOffset; }; // |
