summaryrefslogtreecommitdiff
path: root/indra/llui/llmultifloater.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-10-29 15:37:25 -0700
committerJames Cook <james@lindenlab.com>2009-10-29 15:37:25 -0700
commit432e243e1aca565ea19091d39f1ff33056ce4075 (patch)
tree20ada2502854689d43b65e5ef035018227537a96 /indra/llui/llmultifloater.cpp
parent00af1cca0083120149e3b7a7a793285b3c9ad882 (diff)
EXT-1352 Add image art to floater backgrounds.
Implemented "legacy_header_height" hack to account for new art being 25 pixels tall instead of legacy 18 pixels -- it auto-sizes the floaters to be taller. Made all floaters have resize handles, just disable and make invisible if unused. This simplifies the floater construction logic. Floater header height now lives in floater.xml, not as a global saved setting. Reviewed with Richard.
Diffstat (limited to 'indra/llui/llmultifloater.cpp')
-rw-r--r--indra/llui/llmultifloater.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/llui/llmultifloater.cpp b/indra/llui/llmultifloater.cpp
index e8ce1a8d97..7d21c7e0c1 100644
--- a/indra/llui/llmultifloater.cpp
+++ b/indra/llui/llmultifloater.cpp
@@ -54,7 +54,8 @@ LLMultiFloater::LLMultiFloater(const LLSD& key, const LLFloater::Params& params)
void LLMultiFloater::buildTabContainer()
{
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
LLTabContainer::Params p;
p.name(std::string("Preview Tabs"));
@@ -131,7 +132,8 @@ BOOL LLMultiFloater::closeAllFloaters()
void LLMultiFloater::growToFit(S32 content_width, S32 content_height)
{
static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
S32 new_width = llmax(getRect().getWidth(), content_width + LLPANEL_BORDER_WIDTH * 2);
S32 new_height = llmax(getRect().getHeight(), content_height + floater_header_size + tabcntr_header_height);
@@ -461,7 +463,8 @@ BOOL LLMultiFloater::postBuild()
void LLMultiFloater::updateResizeLimits()
{
static LLUICachedControl<S32> tabcntr_close_btn_size ("UITabCntrCloseBtnSize", 0);
- static LLUICachedControl<S32> floater_header_size ("UIFloaterHeaderSize", 0);
+ const LLFloater::Params& default_params = LLFloater::getDefaultParams();
+ S32 floater_header_size = default_params.header_height;
S32 tabcntr_header_height = LLPANEL_BORDER_WIDTH + tabcntr_close_btn_size;
// initialize minimum size constraint to the original xml values.
S32 new_min_width = mOrigMinWidth;