diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-11-17 13:03:08 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-11-17 13:03:08 +0200 |
commit | 812d18515ddefd11fe8c5fc7f655280a231670f5 (patch) | |
tree | 88dc15d5ac746ce8d9ca6ae1e9e5552e52757db3 /indra/llui | |
parent | 3df42196e3ead1419d456a715081d37b454b5bc1 (diff) |
Completed major sub-task EXT-991 (Update bottom bar behavior on resize)
- added possibility to shrink/extend buttons (gestures, move, view) while resizing
- I had to add LLLayoutStack::getPanelMinSize interface to validate width of Layout panels with these buttons
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lllayoutstack.cpp | 13 | ||||
-rw-r--r-- | indra/llui/lllayoutstack.h | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index 14a6ddb7e0..1fb618adee 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -413,6 +413,19 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au } } +bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp) +{ + LayoutPanel* panel = findEmbeddedPanelByName(panel_name); + + if (panel) + { + if (min_widthp) *min_widthp = panel->mMinWidth; + if (min_heightp) *min_heightp = panel->mMinHeight; + } + + return NULL != panel; +} + static LLFastTimer::DeclareTimer FTM_UPDATE_LAYOUT("Update LayoutStacks"); void LLLayoutStack::updateLayout(BOOL force_resize) { diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index 9cbcb285dc..abd5436018 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -82,6 +82,14 @@ public: void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize); + /** + * Gets minimal width and/or height of the specified by name panel. + * + * If it is necessary to get only the one dimension pass NULL for another one. + * @returns true if specified by panel_name internal panel exists, false otherwise. + */ + bool getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp); + void updateLayout(BOOL force_resize = FALSE); static void updateClass(); |