summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-20 20:00:42 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-20 20:00:58 +0300
commitd298c9983b9ffc9f212fd9325b1ff5f0e6e7aaab (patch)
tree147d413d248f9a303e3c7b27d4c61d59792626a8 /indra/newview
parent7b5dd3154b81f1cbd1f653db6ad76850dcb79d69 (diff)
SL-14906 Fix LLFloaterHowTo overriding stored position
preferred_media_size was repositioning the floater
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterhowto.cpp21
-rw-r--r--indra/newview/skins/default/xui/en/floater_how_to.xml6
2 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llfloaterhowto.cpp b/indra/newview/llfloaterhowto.cpp
index d6c4ed1b20..665955c946 100644
--- a/indra/newview/llfloaterhowto.cpp
+++ b/indra/newview/llfloaterhowto.cpp
@@ -33,6 +33,9 @@
#include "llweb.h"
+const S32 STACK_WIDTH = 300;
+const S32 STACK_HEIGHT = 505; // content will be 500
+
LLFloaterHowTo::LLFloaterHowTo(const Params& key) :
LLFloaterWebContent(key)
{
@@ -49,15 +52,19 @@ BOOL LLFloaterHowTo::postBuild()
void LLFloaterHowTo::onOpen(const LLSD& key)
{
LLFloaterWebContent::Params p(key);
- if (!p.url.isProvided() || p.url.getValue().empty())
- {
- std::string url = gSavedSettings.getString("GuidebookURL");
- p.url = LLWeb::expandURLSubstitutions(url, LLSD());
- p.show_chrome = false;
- p.preferred_media_size = LLRect(0, 500, 300, 0);
- }
+ std::string url = gSavedSettings.getString("GuidebookURL");
+ p.url = LLWeb::expandURLSubstitutions(url, LLSD());
+ p.show_chrome = false;
LLFloaterWebContent::onOpen(p);
+
+ // Elements from LLFloaterWebContent did not pick up restored size (save_rect) of LLFloaterHowTo
+ // set the stack size and position (alternative to preferred_media_size)
+ LLLayoutStack *stack = getChild<LLLayoutStack>("stack1");
+ LLRect stack_rect = stack->getRect();
+ stack->reshape(STACK_WIDTH, STACK_HEIGHT);
+ stack->setOrigin(stack_rect.mLeft, stack_rect.mTop - STACK_HEIGHT);
+ stack->updateLayout();
}
LLFloaterHowTo* LLFloaterHowTo::getInstance()
diff --git a/indra/newview/skins/default/xui/en/floater_how_to.xml b/indra/newview/skins/default/xui/en/floater_how_to.xml
index c06ff7be28..b4dd2e252f 100644
--- a/indra/newview/skins/default/xui/en/floater_how_to.xml
+++ b/indra/newview/skins/default/xui/en/floater_how_to.xml
@@ -4,14 +4,12 @@
can_resize="false"
can_minimize="false"
can_close="false"
- height="775"
+ height="525"
layout="topleft"
- top="0"
- min_width="335"
name="floater_how_to"
single_instance="true"
save_visibility="true"
save_rect="true"
title="WELCOME ISLAND GUIDEBOOK"
- width="780"
+ width="310"
filename="floater_web_content.xml"/> \ No newline at end of file