summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-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